While playing checkers, someone wants a program that, for each board, finds the largest number of pieces lying on a single row.
Given several checkerboards, output for each one the maximum number of pieces that share the same row.
The first line contains $B$, the number of checkerboards.
Each of the next $B$ lines describes one board. A line starts with $n$, the number of pieces on that board, followed by $n$ pairs of integers giving the column and row of each piece, in that order.
Each board is $8 \times 8$, and every coordinate lies between $(1,1)$ and $(8,8)$.
For each checkerboard, print the maximum number of pieces on any single row, one value per line.