#C2576. Most Frequent Character

    ID: 45907 Type: Default 1000ms 256MiB

Most Frequent Character

Most Frequent Character

You are given a string s. Your task is to find the most frequently occurring character in the string. In case of a tie (i.e. multiple characters have the same frequency), output the character which comes first in lexicographical order.

Formally, let \(f(c)\) denote the frequency of character \(c\) in the string \(s\). You should output the character \(c\) such that \(f(c)\) is maximized, and if there exist multiple such characters, choose the one with the smallest value in lexicographical order.

inputFormat

The input consists of a single line containing the string \(s\). The string contains only lowercase English letters. Its length is at least 1 and at most \(10^5\).

outputFormat

Output a single character representing the most frequent character in the string as described above.

## sample
examplestring
e