Tomorrow is Manuel's birthday, and you are preparing a surprise party for him. You are in charge of the decorations, but you are too lazy to go to the store. Fortunately, you already have a row of balloons left over from another birthday. To make it less obvious that they are the same, you plan to remove the balloons of a certain color and keep the rest. You have $$$n$$$ balloons arranged in a row, each of one of $$$2 \le k \le n$$$ colors. The color of the $$$i$$$-th balloon will be $$$1 \le a_i \le k$$$.
We will choose a color $$$c$$$ and pop all the balloons of that color. After popping them, there will be a new row of balloons that contains all the balloons that were not of color $$$c$$$, in the same order they were before the popping.
Manuel really likes consecutive segments of balloons of the same color. Therefore, you are interested in knowing for each color $$$c$$$ to pop what the maximum number of consecutive balloons of any color will remain after popping those of color $$$c$$$.
The first line contains an integer $$$T$$$, the number of cases. There are $$$T$$$ cases, each with $$$2$$$ lines:
For each case, you must print $$$k$$$ numbers in one line: The $$$i$$$-th is the answer when you remove color $$$i$$$.
17 31 1 2 1 2 3 1
2 3 2