There is a street with n houses in a line, numbered from 1 to n. The house i is initially painted in color ci. The street is considered beautiful if all houses are painted in the same color. Tom, the painter, is in charge of making the street beautiful. Tom’s painting capacity is defined by an integer, let’s call it k.
On one day, Tom can do the following repainting process that consists of two steps:
He chooses two integers l and r such that 1≤l≤r≤n and r−l+1=k.
For each house i such that l≤i≤r, he can either repaint it with any color he wants, or ignore it and let it keep its current color.
Note that in the same day Tom can use different colors to repaint different houses.
Tom wants to know the minimum number of days needed to repaint the street so that it becomes beautiful.
Input
The first line of input contains a single integer t (1≤t≤104), the number of test cases. Description of test cases follows.
In the first line of a test case description there are two integers n and k (1≤k≤n≤105).
The second line contains n space-separated integers. The i-th of these integers represents ci (1≤ci≤100), the color which house i is initially painted in.
It is guaranteed that the sum of n over all test cases does not exceed 105.
Output
Print t lines, each with one integer: the minimum number of days Tom needs to make the street beautiful for each test case.
Example
inputCopy
3
10 2
1 1 2 2 1 1 2 2 2 1
7 1
1 2 3 4 5