#C14171. Most Frequent Character

    ID: 43791 Type: Default 1000ms 256MiB

Most Frequent Character

Most Frequent Character

Given a string s consisting exclusively of lowercase letters, your task is to find the character that appears the most frequently. In case multiple characters have the same maximum frequency, you should return the character that comes first in alphabetical order.

Formally, let the frequency of a character \( c \) in the string be denoted by \( f(c) \). You need to output the character \( c^* \) such that

[ c^* = \min{ c \mid f(c) = \max_{d \in s} f(d) } ]

If the input string is empty, output an empty string.

inputFormat

The input is provided via standard input. It consists of a single line containing a string s of lowercase letters. The string may be empty.

outputFormat

Output a single line to standard output containing the most frequent character. If the string is empty, output an empty string.

## sample
a
a