#K42682. Highest Frequency Character

    ID: 27142 Type: Default 1000ms 256MiB

Highest Frequency Character

Highest Frequency Character

Given a string \(S\), the task is to find the character that appears most frequently in \(S\). If there are multiple characters with the maximum frequency, output the lexicographically smallest one. If the input string is empty, output None.

For example, if \(S = "aabbbcc"\), the result is \(b\) as it appears most frequently.

inputFormat

The input consists of a single line that contains the string \(S\). Note that \(S\) might be empty.

outputFormat

Output a single line containing the character with the highest frequency. If \(S\) is empty, output None.

## sample
a
a

</p>