Most Common Letter
Print the letter that occurs most often; break ties by alphabetical order.
Input: one line with the string S.
Output: the most common letter (alphabetically first on ties).
Constraints:
- 1 ≤ |S| ≤ 104
- S contains lowercase English letters
Sample Tests
Input 1
mississippi
Output 1
i
Input 2
abab
Output 2
a
Discussion (opens after you solve — no spoilers before)
No comments yet.