Theofanis has a string s1s2…sn and a character c. He wants to make all characters of the string equal to cc using the minimum number of operations.
In one operation he can choose a number xx (1≤x≤n) and for every position i, where i is not divisible by x, replace sisi with c.
Find the minimum number of operations required to make all the characters equal to cc and the xx-s that he should use in his operations.
Input
The first line contains a single integer tt (1≤t≤104) — the number of test cases.
The first line of each test case contains the integer nn (3≤n≤3⋅10^5) and a lowercase Latin letter c — the length of the string s and the character the resulting string should consist of.
The second line of each test case contains a string ss of lowercase Latin letters — the initial string.
It is guaranteed that the sum of nn over all test cases does not exceed 3⋅10^5.
Output
For each test case, firstly print one intege