#C1084. Most Frequent Character
Most Frequent Character
Most Frequent Character
You are given a string S consisting of various characters including lowercase, uppercase letters, and digits. Your task is to determine the character that appears most frequently in the string. In the event of a tie, return the lexicographically smallest character.
The definition of lexicographical order is the natural order defined by the ASCII values of the characters.
Note: The input will be provided via standard input and your program should output the answer to standard output.
Examples:
Input: aabbbcc Output: b</p>Input: abBc Output: B
inputFormat
The input consists of a single line containing the string S. The string may include letters (both lowercase and uppercase) and digits. It is guaranteed that the string is non-empty.
outputFormat
Output a single character which is the most frequent character in S. If there is a tie, output the lexicographically smallest character.
## sampleaabbbcc
b