Chef has a sequence
and an integer . Now there is a sliding window of size which is moving from the very left of the array to the very right and at a particular time Chef has access to only those elements that are present in that window and Chef wants to find the number of the distinct elements of each window of size . Help Chef to find the answer.
Input
- The first line of the input contains a single integer denoting the number of test cases. The description of test cases follows.
- The first line of each test case contains two integers and .
- The second line contains space-separated integers .
Output
For each test case, print a single line containing space-separated integers — the number of the distinct elements of each window of size from the very left of the array to the very right of the sequence.
Constraints
- for each valid
Example Input
2
6 3
5 8 5 4 4 1
4 2
4 5 2 2
Example Output
2 3 2 2
2 2 1
Explanation
Example case 1: Number of the distinct elements of , , , are respectively , , , .
ConversionConversion EmoticonEmoticon