At the end of a day at the beach there is a party with several stages. Each stage plays one music style, and every person walks over to the stage playing the style they like best among those being played. Because everyone flocks to the music they prefer, you may end up separated from most of your friends.
For example, suppose there are two stages: one plays Gregorian Chant and the other plays Polkas. You prefer Chant, but your best friend prefers Polkas, so he goes to the other stage. If that stage had played Country instead (which your friend dislikes), he would have joined you at the Chant stage. So the question is: which styles, if assigned to the stages, keep the largest number of your friends at the same stage as you?
Formally, there are $s$ stages and $m \ge s$ music styles. Each stage is assigned exactly one style, and no style may be used on more than one stage. Every person, including you, has a strict preference order over all $m$ styles and always goes to the stage playing their most preferred style among the ones chosen. Determine the assignment of styles to stages that maximizes the number of friends (including you) at the same stage as you.
The first line contains an integer $K \ge 1$, the number of data sets. Each data set has the following form.
The first line of a data set contains three integers $s$, $m$, and $n$: the number of stages, the number of music styles, and the number of friends ($1 \le s \le 10$, $1 \le m \le 20$, $1 \le n \le 100$, and $m \ge s$). The next $n$ lines each describe one person, the first of them being you. Each description is a permutation of the styles $1, 2, \ldots, m$, listed from most preferred to least preferred.
For each data set, first output a line "Data Set x:" by itself, where $x$ is the data set number (starting from 1). Then output, on its own line, the maximum number of friends (including yourself) that can listen to the same music as you, taken over every possible assignment of styles to stages. You do not need to output the assignment itself.