Next, Meherun's tool should report the single most frequent character typed into a document (breaking ties alphabetically). Read a string of lowercase letters. Print the most frequent character. If there's a tie, print the alphabetically smallest among the tied characters.
Input
One string S.
Output
A single character.
Constraints
1 ≤ |S| ≤ 10^5
Sample Input
banana
Sample Output
a
main.c
Loading editor…
Write C, then Run (custom I/O) or Submit (sample tests). ⌘/Ctrl+Enter submits.