#t114. 词频统计
词频统计
Word Frequency Counting
Problem Description
In text processing, counting how often words appear is a common task. Given words, find the one that appears most frequently. Letter case is ignored here (i.e. Apple, apple, APPLE, aPPle all count as the same word).
Write a program that reads words and outputs the most frequent word.
Input Format
The first line contains an integer , the number of words.
The next lines each contain one word, consisting of uppercase and lowercase English letters.
It is guaranteed that exactly one word is the most frequent.
Output Format
Output one line containing the most frequent word (output in lowercase).
Sample Input
6
Apple
banana
apple
Orange
banana
apple
Sample Output
apple
Sample Explanation
In the sample there are words. Ignoring case, Apple becomes apple, banana becomes banana, apple becomes apple, Orange becomes orange, banana becomes banana, apple becomes apple. Counting occurrences: apple appears times, banana times, orange time. The most frequent word is apple, so the program outputs its lowercase form apple.
Constraints
For all test data, , each word has length at most , and consists only of uppercase and lowercase letters.