cho.sh
Notes
Loading...

Most Frequent Letter

Time limit

2s

Memory limit

128 MB

Problem

Given a word made of uppercase and lowercase English letters, determine which alphabet letter appears most often. Uppercase and lowercase versions of the same letter are treated as the same letter.

Input

The first line contains a word made of uppercase and lowercase English letters. The length of the word is at most 1,000,000.

Output

Print the most frequent letter in uppercase on the first line. If two or more letters are tied for the highest frequency, print ?.