After seeing "the news," the whole family got excited. Everyone knew that Grandpa had been an outstanding bridge (a type of card game) player for decades, but the news that he was being entered into the Guinness Book of Records as the greatest bridge player of all time was truly astonishing!
For many years, the International Bridge Association (IBA) has recorded the weekly rankings of the most skilled players. Every time a player's name appears in a week's ranking, that player earns 1 point, and Grandpa earned the most points and was named the greatest bridge player.
Grandpa had many friends who competed with him for the bridge rankings, so he was very curious about which player (or players) came in second place.
The IBA's ranking data is now available online. Write a program that takes the weekly ranking lists as input and determines who the second-place player is.
Each player is identified by an integer (a player number) from $1$ to $10000$. The input consists of several test cases.
The first line of each test case contains two integers $N$ and $M$, meaning that for $N$ ($2 \le N \le 500$) weeks, the rankings of the top $M$ ($2 \le M \le 500$) players each week are given.
Then $N$ lines follow, each describing one week's ranking. Each line contains $M$ integers separated by spaces.
A line where $N$ and $M$ are both $0$ marks the end of the input.
For each test case, print the number(s) of the second-place player(s) on a single line. If two or more players are tied for second place (a tie), print each player number separated by a space in ascending order.