#C8485. Lexicographically Smallest String Transformation
Lexicographically Smallest String Transformation
Lexicographically Smallest String Transformation
Given a string S consisting only of lowercase English letters, you are allowed to replace any number of characters in the string with any lowercase English letter. Your task is to transform S into the lexicographically smallest string possible. Note that replacing characters is not restricted in terms of count; you may replace all characters if needed.
In fact, the lexicographically smallest string that can be obtained from S is a string consisting entirely of the letter a
. Formally, if the length of S is n, then the answer is given by:
$$\text{answer} = \underbrace{a\,a\,\cdots\,a}_{n\text{ times}}$$
Follow the input and output format as described below.
inputFormat
The input is read from standard input and consists of a single line with the string S. The string S contains only lowercase English letters.
outputFormat
Output to standard output a single line containing the lexicographically smallest string possible, which is a string consisting entirely of the letter a
with the same length as S.
a
a