By Joao Marcos Salvanini Bellini de Moraes, IFSULDEMINAS Brazil
In Nlogonia, several programmers participate in a cryptography competition named "Decrypt it!", in which the one who decrypt more messages wins.
In the middle of the competition, you notice that to continue and decrypt a message, you must solve the following challenge: find the most frequent digit of a number with up to 1001 digits.
The input consists of several lines, containing an integer N (1 ≤ N ≤ 101000). Read input until EOF.
Print the most frequent digit of the given number. If there's more than one, print the greatest one among them.
|Input Sample||Output Sample|