#P5619. Jam's store

Jam's store

Problem Description

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

Input

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

Output one line about the time at least they need to wait

1 4 3 4 4 1 5 8 2 5 6 4 5 10 5
7

Hint


the first guest choose the third staff
the second guest choose the second staff
the third gurst choose the third staff
the total of time is 4+2+1=7