Time limit
2s
Memory limit
128 MB
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.
The first line contains a word made of uppercase and lowercase English letters. The length of the word is at most 1,000,000.
Print the most frequent letter in uppercase on the first line. If two or more letters are tied for the highest frequency, print ?.