#C9979. Most Frequent Character
Most Frequent Character
Most Frequent Character
You are given a string consisting of only lowercase English letters. Your task is to find the character that appears most frequently in the string. In case there are multiple characters with the same maximum frequency, return the one that comes first in alphabetical order.
Note: The input is provided on standard input (stdin) and the result should be printed on standard output (stdout).
For example: if the input string is abaccabc
, the character 'a' appears most frequently and is returned.
inputFormat
The input consists of a single line containing a string s
composed only of lowercase letters. The length of the string is at least 1 and can be very large.
outputFormat
Output a single character which is the most frequent in the string. In case of a tie, output the character that is lexicographically smallest.
## samplea
a
</p>