#K9196. Most Frequent Character
Most Frequent Character
Most Frequent Character
You are given a string S consisting of only uppercase and lowercase English letters. First, convert all letters of the string to lowercase. Then, determine the character that appears most frequently in the string. If there is a tie (i.e. more than one character has the maximum frequency), output the lexicographically smallest character.
Formally, let \( f(c) \) denote the frequency of character \( c \) in \( S \) (after converting to lowercase). You need to find the character \( c^* \) such that:
\[ c^* = \min\{ c \mid f(c) = \max_{d} f(d) \}. \]The input will be read from stdin and the output should be written to stdout.
inputFormat
The input consists of a single line containing the string S (1 ≤ |S| ≤ 105). The string contains only uppercase and lowercase English letters.
outputFormat
Output a single character: the most frequent character in the given string (after conversion to lowercase). In case of a tie, output the lexicographically smallest one.
## sampletestString
t