Sanggeun goes for a stroll every day to stay healthy.
His town is laid out like a go board, with $(H+1)$ horizontal roads and $(W+1)$ vertical roads. Call each point where two roads meet an intersection. The intersection in the $a$-th row from the top and the $b$-th column from the left is written $(a, b)$. Sanggeun's house sits at the top-left intersection $(1, 1)$, and every stroll starts there.
Each of the $H \times W$ intersections from $(1, 1)$ to $(H, W)$ has a single direction letter written on it: R means right and D means down.
One stroll proceeds by the following rule. If the letter on the current intersection is
He repeats this until he reaches an intersection on the rightmost vertical road (column $W+1$) or the bottommost horizontal road (row $H+1$), where the stroll ends. These boundary intersections have no letter.
Because the letters change as he walks, each stroll can follow a different route. Sanggeun wonders where his $N$-th stroll will end if he keeps repeating this process.
Given $H$, $W$, and the letter initially written on each intersection, write a program that finds the intersection where the $N$-th stroll ends.
The first line contains three integers $H$, $W$, and $N$, separated by spaces. ($1 \le H, W \le 1000$, $1 \le N \le 10^7$)
Each of the next $H$ lines contains $W$ integers. The $j$-th integer on the $i$-th line describes the letter initially written on intersection $(i, j)$: $0$ is D (down) and $1$ is R (right).
Let $(i, j)$ be the intersection where the $N$-th stroll ends. Print $i$ and $j$ on one line, separated by a space.