You are given n lowercase words and a number k. Rank the distinct words: a word with a higher count ranks earlier, and words with equal counts are ordered alphabetically (the lexicographically smaller word first). This is a strict total order, so the ranking is unique.
Output the first k words in this ranking.
Input format
Line 1: two integers n and k.
Line 2: n space-separated lowercase words.
Output format
One line: the top k words in the described order, space-separated.
Constraints
- 1 <= n <= 100000
- 1 <= k <= number of distinct words
- Each word has length between 1 and 20 and contains only
a-z.