{"problem":{"name":"135. Anti-sort","description":{"content":"You're given a list of $n$ words. You've discovered that when a rival CodeQuest team finds a list of words, they sort it in alphabetical order. To distinguish yourself from your rival CodeQuest team, ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269135"},"statements":[{"statement_type":"Markdown","content":"You're given a list of $n$ words. You've discovered that when a rival CodeQuest team finds a list of words, they sort it in alphabetical order. To distinguish yourself from your rival CodeQuest team, you decide to sort the list of words in reverse order.\n\nThe first line of input contains a single positive integer $n$: the number of words.\n\nThe next $n$ lines each contain a single word, consisting only of lowercase letters\n\nOutput $n$ lines: the list of words, sorted in reverse alphabetical order.\n\n## Input\n\nThe first line of input contains a single positive integer $n$: the number of words.The next $n$ lines each contain a single word, consisting only of lowercase letters\n\n## Output\n\nOutput $n$ lines: the list of words, sorted in reverse alphabetical order.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of words.  \nLet $ W = (w_1, w_2, \\dots, w_n) $ be a sequence of words, where each $ w_i \\in \\Sigma^* $ and $ \\Sigma = \\{a, b, \\dots, z\\} $.\n\n**Constraints**  \n1. $ 1 \\leq n \\leq \\infty $ (implicit from input format)  \n2. Each word $ w_i $ consists solely of lowercase Latin letters.\n\n**Objective**  \nOutput the sequence $ W $ sorted in reverse alphabetical order, i.e., descending lexicographical order:  \n$$\nw_{\\sigma(1)} \\geq w_{\\sigma(2)} \\geq \\dots \\geq w_{\\sigma(n)}\n$$  \nwhere $ \\sigma $ is a permutation of $ \\{1, 2, \\dots, n\\} $ such that the sequence is non-increasing under lexicographic comparison.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269135","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}