Problem I
Upside Down
The world is in danger! The year is $1986$ and monsters have invaded your small town of Dawkins. One of your closest friends, Bill Wyers, has been kidnapped and you have decided to save him (without the help of cops because why not). Bill is sending you messages of his location, but in order to read them, they must be sorted! The catch is, everything must be flipped since he is in the Upside Down! Can you save your friend in time?
Input
The first line of input is an integer, $n$ ($2 \le n \le 10\, 000$), denoting the number of words in the input. The next line contains $n$ space-separated strings.
Output
The output should be the reversed words, sorted in reverse alphabetical order.
Sample Input 1 | Sample Output 1 |
---|---|
5 rood tsae krad pleh tsohg |
help ghost east door dark |