Pirates talk a funny way. They say word where the letters are repeated more than they need to be. We would like know which letter appears the most frequently in a Pirate word.
For example: In the word “arrrrrghh”, the letter “r” appears 5 times while “h” appears twice.
Write a program that reads a pirate word from the terminal and writes the letter that occurs most frequently.
It is guaranteed that only one letter is the most repeated. That is, words like “aipo” won’t appear because no single letter wins.
The input will consist of two lines.
The first line will contain the size of the word and the second the word to process.
The word will only contain lowercase letters from a to z. The size of the word will be at most 1000 characters. No spaces or other symbols will appear.
Print a single line with the character that appears the most and the number of occurrences.