You are given a non-decreasing array of non-negative integers a_1, a_2, …, a_n. Also you are given a positive integer k.

You want to find m non-decreasing arrays of non-negative integers b_1, b_2, …, b_m, such that:

  * The size of b_i is equal to n for all 1 ≤ i ≤ m. 
  * For all 1 ≤ j ≤ n, a_j = b_{1, j} + b_{2, j} + … + b_{m, j}. In the other word, array a is the sum of arrays b_i. 
  * The number of different elements in the array b_i is at most k for all 1 ≤ i ≤ m. 



Find the minimum possible value of m, or report that there is no possible m.

Input

The first line contains one integer t (1 ≤ t ≤ 100): the number of test cases.

The first line of each test case contains two integers n, k (1 ≤ n ≤ 100, 1 ≤ k ≤ n).

The second line contains n integers a_1, a_2, …, a_n (0 ≤ a_1 ≤ a_2 ≤ … ≤ a_n ≤ 100, a_n > 0).

Output

For each test case print a single integer: the minimum possible value of m. If there is no such m, print -1.

Example

Input


6
4 1
0 0 0 1
3 1
3 3 3
11 3
0 1 2 2 3 3 3 4 4 4 4
5 3
1 2 3 4 5
9 4
2 2 3 5 7 11 13 13 17
10 7
0 1 1 2 3 3 4 5 5 6


Output


-1
1
2
2
2
1

Note

In the first test case, there is no possible m, because all elements of all arrays should be equal to 0. But in this case, it is impossible to get a_4 = 1 as the sum of zeros.

In the second test case, we can take b_1 = [3, 3, 3]. 1 is the smallest possible value of m.

In the third test case, we can take b_1 = [0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2] and b_2 = [0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2]. It's easy to see, that a_i = b_{1, i} + b_{2, i} for all i and the number of different elements in b_1 and in b_2 is equal to 3 (so it is at most 3). It can be proven that 2 is the smallest possible value of m.

import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
import java.util.*;
     //FuCk ThE RaTiNgS.
     //YoU NeVeR LoSe EiThEr YoU LeArN Or YoU WiN.

public class A {
  static class Reader 
  { 
      final private int BUFFER_SIZE = 1 << 16; 
      private DataInputStream din; 
      private byte[] buffer; 
      private int bufferPointer, bytesRead; 

      public Reader() 
      { 
          din = new DataInputStream(System.in); 
          buffer = new byte[BUFFER_SIZE]; 
          bufferPointer = bytesRead = 0; 
      } 

      public Reader(String file_name) throws IOException 
      { 
          din = new DataInputStream(new FileInputStream(file_name)); 
          buffer = new byte[BUFFER_SIZE]; 
          bufferPointer = bytesRead = 0; 
      } 

      public String readLine() throws IOException 
      { 
          byte[] buf = new byte[64]; // line length 
          int cnt = 0, c; 
          while ((c = read()) != -1) 
          { 
              if (c == '\n') 
                  break; 
              buf[cnt++] = (byte) c; 
          } 
          return new String(buf, 0, cnt); 
      } 

      public int nextInt() throws IOException 
      { 
          int ret = 0; 
          byte c = read(); 
          while (c <= ' ') 
              c = read(); 
          boolean neg = (c == '-'); 
          if (neg) 
              c = read(); 
          do
          { 
              ret = ret * 10 + c - '0'; 
          }  while ((c = read()) >= '0' && c <= '9'); 

          if (neg) 
              return -ret; 
          return ret; 
      } 

      public long nextLong() throws IOException 
      { 
          long ret = 0; 
          byte c = read(); 
          while (c <= ' ') 
              c = read(); 
          boolean neg = (c == '-'); 
          if (neg) 
              c = read(); 
          do { 
              ret = ret * 10 + c - '0'; 
          } 
          while ((c = read()) >= '0' && c <= '9'); 
          if (neg) 
              return -ret; 
          return ret; 
      } 

      public double nextDouble() throws IOException 
      { 
          double ret = 0, div = 1; 
          byte c = read(); 
          while (c <= ' ') 
              c = read(); 
          boolean neg = (c == '-'); 
          if (neg) 
              c = read(); 

          do { 
              ret = ret * 10 + c - '0'; 
          } 
          while ((c = read()) >= '0' && c <= '9'); 

          if (c == '.') 
          { 
              while ((c = read()) >= '0' && c <= '9') 
              { 
                  ret += (c - '0') / (div *= 10); 
              } 
          } 

          if (neg) 
              return -ret; 
          return ret; 
      } 

      private void fillBuffer() throws IOException 
      { 
          bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); 
          if (bytesRead == -1) 
              buffer[0] = -1; 
      } 

      private byte read() throws IOException 
      { 
          if (bufferPointer == bytesRead) 
              fillBuffer(); 
          return buffer[bufferPointer++]; 
      } 

      public void close() throws IOException 
      { 
          if (din == null) 
              return; 
          din.close(); 
      } 
  } 

 public static void main(String[] args)throws Exception  {
  
   Scanner sc= new Scanner(System.in);
   int t=sc.nextInt();
   while(t-->0) {
       int n=sc.nextInt();
       int k=sc.nextInt();
       int a[]=new int[n];
       HashSet<Integer> s=new HashSet<>();
       for(int i=0;i<n;i++) {
         a[i]=sc.nextInt();
         s.add(a[i]);
       }
       if(s.size()>=2&&k==1) {
         System.out.println(-1);
       }else {
         if(s.size()==k) {
           System.out.println(1);
         }else if(s.size()>k) {
           System.out.println((s.size()-2)/(k-1) +1);
         }else {
           System.out.println(1);
         }
       }
   
       

   

 }
 }

 static long modInverse(long fac, int p) 
 { 
     return pow(fac, p - 2); 
 } 


 static long nCr(int n, int r, 
                          int p) 
 { 

   
     if (r == 0) 
         return 1; 


     long [] fac = new long [n + 1]; 
     fac[0] = 1; 

     for (int i = 1; i <= n; i++) 
         fac[i] = fac[i - 1] * i % p; 

     return (fac[n] * modInverse(fac[r], p) 
             % p * modInverse(fac[n - r], p) 
             % p) 
         % p; 
 } 


 public static long[] fact;
 public static long[] invfact;
 public static long ncr(int n, int r){
   if(r > n) return 0;
   return ((((fact[n]) * (invfact[r])) % mod)* invfact[n-r]) % mod;
}
static int mod=(int)1e9+7;
static long pow(long x,long y) {
  long res=1l;
  while(y!=0) {
    if(y%2==1) {
      res=x*res%mod;
    }
    y/=2;
    x=x*x%mod;
  }
  return res;
}

}
class pair {
  int x,y;
  pair(int x,int y){
    this.x=x;
    this.y=y;
  }

}
