#C14701. Most Frequent Character

    ID: 44380 Type: Default 1000ms 256MiB

Most Frequent Character

Most Frequent Character

You are given a string consisting of lowercase letters. Your task is to determine the most frequently occurring character in the string. If there are multiple characters with the same highest frequency, return the one that comes earliest in the alphabet.

Formally, if the frequency of character c is denoted by \( f(c) \), then you need to find the character \( c^* \) such that \[ f(c^*) = \max_{c \in S} f(c) \quad \text{and if } f(c_1) = f(c_2), \text{ then } c_1 < c_2 \text{ in lexicographical order}. \]

The input is provided via stdin and the output should be printed to stdout.

inputFormat

The input consists of a single line containing a string s which consists of lowercase English letters (a-z). You can assume that the string is non-empty.

outputFormat

Print a single character which is the most frequently occurring character in the string. In case of a tie, output the character that is smallest in alphabetical order.

## sample
a
a