A - Weekend Lottery

Languages: C, C++, Java, Haskell, Pascal, Python, JavaScript, Tiger, C#
Time & Memory limits: (details)

Some people are against lotteries on moral grounds, some governments forbid lotteries, but with the advent of Internet this popular form of gambling, which started in China and helped finance the Great Wall, is thriving.

But the odds of winning a national lottery are tiny, and therefore your college classmates decided to organize a private lottery, with draws every Friday. The lottery is based on a popular style: a student who wants to bet chooses $C$ distinct numbers from $1$ to $K$ and pays $\texttt{US}\$ 1.00$ (notice that traditional lotteries such as US National Lotto use $C = 6$ and $K = 49$). On Friday during lunch $C$ numbers (also from $1$ to $K$) are drawn. The student whose bet has the largest number of correct guesses receives the amount collected in the bets. This amount is shared in case of ties and accumulates to next week if no one guessed any of the numbers drawn.

Some of your colleagues do not believe in the laws of probability and asked you to write a program that determines the numbers that have been drawn the fewest times considering all previous draws, so that they can bet on those numbers.

Input

The input contains several test cases. The first line of a test case contains three integers $N$, $C$ and $K$ which indicate respectively the number of draws that have already happened $(1 \leq N \leq 10000)$, how many numbers comprises a bet $(1 \leq C \leq 10)$ and the maximum value of the numbers to be chosen in a bet $(C \lt K \leq 100)$. Each of the next $N$ lines contains $C$ distinct integers $X_i$ indicating the numbers drawn in each previous contest ($1 \leq X_i \leq K$, for $1 \leq i \leq C$). The end of input is indicated by $N = C = K = 0$.

The input must be read from standard input.

Output

For each test case in the input your program must write one line of output, containing the set of numbers that have been drawn the fewest times. This set must be printed as a list, in increasing order of numbers. Leave one blank space between two consecutive numbers in the list.

The output must be written to standard output.

Sample test(s)

Input
5 4 6 6 2 3 4 3 4 6 5 2 3 6 5 4 5 2 6 2 3 6 4 4 3 4 3 2 1 2 1 4 4 3 2 1 4 3 0 0 0
Output
1 1 2 3 4