#C4525. Most Frequent Character
Most Frequent Character
Most Frequent Character
You are given a string that may contain letters, digits, and special characters. Your task is to find the character that appears the most number of times in the string. The counting is case-insensitive (i.e. 'A' and 'a' are treated as the same character). In the event of a tie, you should return the character that appears first in the original string.
In formal terms, if we denote the frequency of a character c (converted to lowercase) in the string S by \( f(c) \), then you should output the character c* such that \( f(c*) \) is maximized. If \( f(c_1) = f(c_2) \) for some characters \( c_1 \) and \( c_2 \), then the character which occurs first in S should be chosen.
Note: The input will be provided through standard input and the result should be printed to standard output.
inputFormat
The input consists of a single line containing a non-empty string. The string may include alphabets, digits, and symbols.
outputFormat
Output the single character that has the highest occurrence (case-insensitive). In the case of a tie, output the character that appears first in the string.
## samplea
a