Given a sequence of words, print them out from the longest word to the shortest word. In the event the number of letters are the same, print the word that appeared in the sequence first. The number of words are not more than 1000 and its length not exceeding 10000.
Input consists of a single integer, n. n denotes the number of words in the sequence provided.
After the first line, n lines of words are given, with one word on each line. These words are the words in the sequence.