Word Order Hackerrank Solution In Python 3, Note: Each input line ends with a "\n" character.