Hide

Problem G
A Simple Game

Whenever Tyko and his mother Maj get into a disagreement on Tyko’s bedtime, they play $10^5$ rounds of their favorite game. If Tyko plays well enough, he gets to stay up for $1$ more hour! The game can be seen as an evolved version of rock-paper-scissors-lizard-Spock, in that in each round, the players choose what to play at the same time, and the combination of their moves is what decides how many points each player gets. To stop the game from being too simple, there may be more possible moves in each round, and instead of just giving out $-1$, $0$ or $1$ point (lose, draw, or win), the reward for a combination of the players’ moves could be set as any integer in the range $[-100, 100]$.

Just before the game starts, Maj defines a $T \times M$ matrix $A$ of integers. In each round of the game, she and Tyko pick one integer each without knowing beforehand what integer the other player will choose. Maj must choose an integer $m$ satisfying $1 \leq m \leq M$ and Tyko must choose an integer $t$ satisfying $1 \leq t \leq T$. Then Tyko is awarded points according to the element in row $t$, column $m$ of $A$. For example, if

\[ A = \begin{pmatrix} 1 & -2 & 0 \\ -1 & 3 & 2 \end{pmatrix}, \]

then Tyko would get 3 points if both he and Maj played the number 2 in a round. But if he played 2 and she played 1, then he would lose 1 point.

Because Tyko is still very young, he has not yet had time to figure out a good strategy for this game. Therefore he needs your help to play and beat his intelligent mother so that he can avoid going to bed!

The exact format of the problem is as follows. You will be given the integers $T$, $M$ and $G$, as well as the $T \times M$ matrix $A$. You will then have to play $10^5$ rounds of this game against Maj. Maj has already chosen the integers that she will play in all the $10^5$ rounds. Your task is now to provide $10^5$ integers of your own, all between $1$ and $T$ inclusive, which are the numbers you wish to play in the different rounds. Then the game will be simulated and your total score will be calculated. If you reach at least $G$ points in total you pass the test case, otherwise it will be judged as Wrong Answer. Being a loving mother, Maj makes sure to make the game fair for Tyko. Therefore, she always sets the value of $G$ such that there is guaranteed to exist a strategy that Tyko could use which would let him win with very high probability, no matter how she plays.

Input

The first line of input contains the integers $T$, $M$ ($2 \leq T, M \leq 20$) and $G$ ($-10^8 \leq G \leq 10^7$). Then follow $T$ lines. The $i$-th of these lines contains $M$ space separated integers, showing row $i$ of $A$. Each entry $a_{ij}$ of $A$ fulfills $-100 \leq a_{ij} \leq 100$.

Output

Output a single line containing $10^5$ space separated integers $t_ i$, representing what you wish to play in each round $i$.

Scoring

Group

Points

Limits

1

20

$ T = M = 2$

2

80

No further restrictions

Sample Explanation

In the sample test case, $T=2$ and $M=3$, and the $2$ last rows give the $2 \times 3$ matrix $A$. To get an accepted verdict, you should normally print $10^5$ integers, in this case with all of them being either $1$ or $2$. However, for everyone’s convenience, in the sample output we decided to omit most of the numbers and replace them with the 3 dots instead.

Sample Input 1 Sample Output 1
2 3 -88188
1 0 -2
-2 -3 2
1 2 2 1 ... 1 1

Please log in to submit a solution to this problem

Log in