JYY, a knight of the JSOI kingdom, has returned home after defeating an evil dragon. King JS intends to marry his princess to JYY, but the young and brave JYY must first pass the princess's test.
JYY enters an $N \times M$ underground maze, starting at the top-left corner with coordinates $(1, 1)$. The exit of the maze is at the bottom-right corner with coordinates $(N, M)$.
As a true knight, JYY can only move in the maze according to the rules of a knight in international chess (an "L" shape). Furthermore, he must never visit the same cell twice, and he cannot move outside the boundaries of the maze.
To pass the princess's test, he must reach the exit of the maze in exactly $T$ steps. Please help him plan his route.
Input
The input consists of a single line containing three positive integers $N$, $M$, and $T$, describing the size of the maze and the required number of steps.
Output
Output exactly $T$ lines, each containing two integers $X_i$ and $Y_i$, representing the position reached at the $i$-th step. You may output any valid action plan. The input is guaranteed to have a solution.
Examples
Input 1
8 8 16
Output 1
3 2 4 4 2 3 3 5 5 6 7 7 8 5 6 6 8 7 6 8 7 6 8 4 6 5 8 6 6 7 8 8
Constraints
| Test Case | $N$ | $M$ | $T$ |
|---|---|---|---|
| 1 | $N = 8$ | $M = 8$ | $T = 48$ |
| 2 | $N = 9$ | $M = 8$ | $T = 17$ |
| 3 | $N = 9$ | $M = 10$ | $T = 63$ |
| 4 | $N = 8$ | $M = 12$ | $T = 20$ |
| 5 | $N = 16$ | $M = 16$ | $T = 192$ |
| 6 | $N = 500$ | $M = 499$ | $T = 187125$ |
| 7 | $N = 500$ | $M = 500$ | $T = 187500$ |
| 8 | $N = 500$ | $M = 500$ | $T = 125000$ |
| 9 | $N = 499$ | $M = 499$ | $T = 1998$ |
| 10 | $N = 499$ | $M = 500$ | $T = 157873$ |