There is a wall consisting of n \times n tiles. These tiles were originally painted in different colors. Now the paint has faded, and the wall needs to be repainted. This time, all tiles must be painted in just one of the colors. In one move, you can paint an entire horizontal or vertical row of tiles. However, you can only paint a row in a particular color if at least two tiles in that row (either horizontal or vertical) are already painted in that color (whether it is the old paint or new).
Your task is to find the minimum number of moves required to repaint all the tiles.
The first line contains the number of test cases.
The first line of each test case contains two integers: (1 < n < 500) — the number of tiles in each row, and (1 \leq k < n) — the number of different colors.
Each of the next lines contains integers indicating the color numbers of the corresponding tiles. Colors are numbered from to .
For each test case, output the minimum number — the minimum number of moves needed to paint all the tiles. On the second line, list all the colors in which the wall can be painted using the minimum number of moves, in ascending order. If it is impossible to paint the wall according to these rules, output only the number .
Пример 1