Write a program that reads a sequence of words and prints the most frequent (in case of a tie, the smallest in alphabetical order).
Input consists of several cases. Every case starts with and , followed by words made up of only lowercase letters. You can assume that is between 1 and the number of different words.
For every case, print the most frequent words in order. Print first the most frequent words, and in case of a tie, the smallest words in lexicographical order. Print a line with 10 dashes at the end of each case.
Input
5 1 hola adeu adeu bye hola 5 2 hola adeu adeu bye hola 5 3 hola adeu adeu bye hola
Output
adeu ---------- adeu hola ---------- adeu hola bye ----------