There is an exam being held at ETH. Chairs in the exam room are arranged in a grid of size $$$n \times m$$$, with the student sitting at the $$$(i,j)$$$ $$$(1 \leq i \leq n; 1 \leq j \leq m)$$$ position having IQ $$$a_{i,j}$$$.
Professors at ETHz have become aware that students sometimes cheat at exam. Cheating at exams always happens the same way. Some set of students $$$S = \{b_1, b_2, \dots, b_s\}$$$ decide before hand to cheat, but a set of students $$$S$$$ is only valid if two of the following conditions hold.
The professors at ETHz have already published the seating arrangement, and it is to late to change it. But they wonder, what is the largest possible number of students cheating in one group.
Each test contains multiple test cases.
The first line contain an integer $$$t$$$ $$$(1 \leq t \leq 100)$$$, the number of test cases. The description of the $$$t$$$ test cases follows.
The first line of each teset case contains three integers $$$n, m, k$$$ $$$(1 \leq n,m \leq 600; 1 \leq k \leq 10^9)$$$.
Then $$$n$$$ lines follow, each line contains $$$m$$$ integers $$$a_{i,1}, a_{i,2}, \dots a_{i,m}$$$ $$$(1 \leq a_{i,j} \leq 10^9)$$$, where $$$a_{i,j}$$$ is the IQ of the student sitting in the $$$i$$$-th row and $$$j$$$-th column.
It is guaranteed that over all test cases $$$\sum n \cdot m \leq 600\cdot 600$$$
For each test case, print the largest possible number of students cheating in one group.
33 3 11 3 11 3 11 3 14 4 21 4 4 11 3 4 23 3 3 42 2 2 22 2 31 47 10
3 13 2