{"raw_statement":[{"iden":"statement","content":"Ayoub has a string $S$ consists of only lower case Latin letters, and he wants you to make some operations on it:\n\nAyoub wants you to make the string lexicographically maximal using the mentioned operations as many times as you want, can you help him?\n\nString $x = x_1 x_2... x_{| x |}$ is lexicographically larger than string $y = y_1 y_2... y_{| y |}$, if either $| x | > | y |$ and $x_1 = y_1, x_2 = y_2,..., x_{| y |} = y_{| y |}$, or exists such number $r (r < | x |, r < | y |)$, that $x_1 = y_1, x_2 = y_2,..., x_r = y_r$ and $x_r + 1 > y_r + 1$. Characters in lines are compared like their ASCII codes.\n\nThe input contains a single string $S$ $(1 <= | S | <= 10^5)$.\n\nIt is guaranteed that string $S$ consists of only lower case Latin letters.\n\nprint the lexicographically maximal string that could be obtained using these two operations.\n\nIn the first test case Ayoub replaced $\\\"b b\\\"$ with $\\\"c\\\"$ so the string has been changed to $\\\"a c x\\\"$, then he swapped 'a' with 'x' so the result is $\\\"x c a\\\"$ and it is the lexicographically maximal string.\n\n"},{"iden":"input","content":"The input contains a single string $S$ $(1 <= | S | <= 10^5)$.It is guaranteed that string $S$ consists of only lower case Latin letters."},{"iden":"output","content":"print the lexicographically maximal string that could be obtained using these two operations."},{"iden":"examples","content":"Inputabbx\nOutputxca\nInputzyayz\nOutputzzza\n"},{"iden":"note","content":"In the first test case Ayoub replaced $\\\"b b\\\"$ with $\\\"c\\\"$ so the string has been changed to $\\\"a c x\\\"$, then he swapped 'a' with 'x' so the result is $\\\"x c a\\\"$ and it is the lexicographically maximal string."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ S = s_1 s_2 \\dots s_n $ be a string of length $ n \\geq 1 $, where $ s_i \\in \\{a, b, \\dots, z\\} $ for all $ i $.\n\n**Operations**  \nTwo operations may be applied any number of times in any order:  \n1. **Replace**: If two consecutive characters $ s_i = s_{i+1} = c $, replace them with the next letter: $ s_i s_{i+1} \\to \\text{chr}(\\text{ord}(c) + 1) $.  \n2. **Swap**: Any two adjacent characters may be swapped.\n\n**Constraints**  \n- $ 1 \\leq n \\leq 10^5 $  \n- All characters in $ S $ are lowercase Latin letters.\n\n**Objective**  \nFind the lexicographically maximal string obtainable from $ S $ via any sequence of the above operations.","simple_statement":"You can swap any two characters and replace any two identical adjacent characters with the next letter in the alphabet (e.g., \"bb\" → \"c\"). Find the lexicographically largest string possible.","has_page_source":false}