Jam didn't study well,then he go to repair the computer in a store,there are $M$ staffs and $N$ guests, given each guests have to spend $T_{ij}$ time to repair the computer by the $j$ staffs.
Now ask the total of time the guest at least to wait.
The staff wiil do the next work after he has done the current work
The first line is $T(1 \leq T \leq 100)$ means $T$ Case
For each case
The first line is $M$ and $N(1 \leq M,N \leq 20)$ means the number of staffs and guests
Now given a Matrix with $N*M$ each number means the $i$ guests to the $j$ staff time $(1 \leq T_{ij} \leq 1000)$
Output one line about the time at least they need to wait