Consider a sequence of integers a_1, a_2, …, a_n. In one move, you can select any element of the sequence and delete it. After an element is deleted, all elements to the right are shifted to the left by 1 position, so there are no empty spaces in the sequence. So after you make a move, the sequence's length decreases by 1. The indices of the elements after the move are recalculated.

E. g. let the sequence be a=[3, 2, 2, 1, 5]. Let's select the element a_3=2 in a move. Then after the move the sequence will be equal to a=[3, 2, 1, 5], so the 3-rd element of the new sequence will be a_3=1 and the 4-th element will be a_4=5.

You are given a sequence a_1, a_2, …, a_n and a number k. You need to find the minimum number of moves you have to make so that in the resulting sequence there will be at least k elements that are equal to their indices, i. e. the resulting sequence b_1, b_2, …, b_m will contain at least k indices i such that b_i = i.

Input

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

Each test case consists of two consecutive lines. The first line contains two integers n and k (1 ≤ k ≤ n ≤ 2000). The second line contains a sequence of integers a_1, a_2, …, a_n (1 ≤ a_i ≤ n). The numbers in the sequence are not necessarily different.

It is guaranteed that the sum of n over all test cases doesn't exceed 2000.

Output

For each test case output in a single line:

  * -1 if there's no desired move sequence; 
  * otherwise, the integer x (0 ≤ x ≤ n) — the minimum number of the moves to be made so that the resulting sequence will contain at least k elements that are equal to their indices. 

Example

Input


4
7 6
1 1 2 3 4 5 6
5 2
5 1 3 2 3
5 2
5 5 5 5 4
8 4
1 2 3 3 2 2 5 5


Output


1
2
-1
2

Note

In the first test case the sequence doesn't satisfy the desired condition, but it can be provided by deleting the first element, hence the sequence will be [1, 2, 3, 4, 5, 6] and 6 elements will be equal to their indices.

In the second test case there are two ways to get the desired result in 2 moves: the first one is to delete the 1-st and the 3-rd elements so that the sequence will be [1, 2, 3] and have 3 elements equal to their indices; the second way is to delete the 2-nd and the 3-rd elements to get the sequence [5, 2, 3] with 2 desired elements.
					/*
					TO LEARN
					1-segment trees
					2-euler tour
				
					*/
					/*
					TO SOLVE 
					uva 1103
					codeforces 722 kavi on pairing duty
					*/
					/*
					bit manipulation shit
					1-Computer Systems: A Programmer's Perspective
					2-hacker's delight
					3-(02-03-bits-ints)
					4-machine-basics
					5-Bits Manipulation tutorialspoint
					*/
					/*
					TO WATCH
					1-what is bitmasking by kartik arora youtube
					*/
					            import java.util.*;
							    import java.math.*;
							    import java.io.*; 
							    import java.util.stream.Collectors;

							       public class A{
					            static FastScanner scan=new FastScanner();
							     public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
static int n,k;
static int arr[];
static int dp[][];
static int rec(int i,int j,int mid)
{
	if(j>=mid)
		return -10000000; 
	if(i==n){
		//out.println(many+" "+j);
		//out.println("FUCK");
		return 0;
	}

//	if(dp[i][j]!=-1)
//		return dp[i][j];
	int toadd=0;
	if(arr[i]==i-j)
		toadd=1;
			return dp[i][j]=Math.max(rec(i+1,j+1,mid),rec(i+1,j,mid)+toadd);
		
}



				public static void main(String[] args)  throws Exception 
					      {
					 

								///scan=new FastScanner("cownomics.in");
							//out = new PrintWriter("cownomics.out");
							 
							 							 /*
							 READING 
						
							 3-Introduction to DP with Bitmasking codefoces
							 4-Bit Manipulation hackerearth
							 5-read more about mobious and inculsion-exclusion 
							 */
		

							    int tt=1;	  
				tt=scan.nextInt();
						    
						//	System.out.println(2^3);
						 outer:while(tt-->0)
							    {
							   
							 
							n=scan.nextInt();
						k=scan.nextInt();
						arr=new int[n];
						dp=new int[n][n];
						int l=0,r=n-1;
						int ans=-1;
						for(int i=0;i<n;i++)
							arr[i]=scan.nextInt()-1;
					//	for(int K[]:dp)
					//		Arrays.fill(K,-1);
						//out.println(rec(0,0,1));
						while(l<=r)
						{

						for(int K[]:dp)
							Arrays.fill(K,-1);
						int mid=(l+r)/2;
							if(rec(0,0,mid)>=k)
							{
								ans=mid-1;
							r=mid-1;
							}
							else 
							{
								l=mid+1;
							}
						}
						out.println(ans);
						
							
 }

							

	out.close();
				}
	    
							static class special{
								boolean bool;
								long n;
								//int id;
								special(boolean bool,long n)
								{
									this.bool=bool;
									this.n=n;
								}
								@Override
								    public int hashCode() {
							                int hash = 7;
				    hash = 31 * hash + (int) n;
				   
				    return hash;
							            }
							              @Override
							            public boolean equals(Object o){
							                if (o == this) return true;
							                if (o.getClass() != getClass()) return false;
							                special t = (special)o;
							                return t.bool == bool && t.n == n;
							            }
							}

							   
							     static long binexp(long a,long n)
							    {
							        if(n==0)
							            return 1;
							        long res=binexp(a,n/2);
							        if(n%2==1)
							            return res*res*a;
							        else 
							            return res*res;
							    }
							     
							    static long powMod(long base, long exp, long mod) {
							           if (base == 0 || base == 1) return base;
							           if (exp == 0) return 1;
							           if (exp == 1) return (base % mod+mod)%mod;
							           long R = (powMod(base, exp/2, mod) % mod+mod)%mod;
							           R *= R;
							           R %= mod;
							           if ((exp & 1) == 1) {
							               return (base * R % mod+mod)%mod;
							           }
							           else return (R %mod+mod)%mod;
							       }
							    static double dis(double x1,double y1,double x2,double y2)
							    {
							        return Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
							    }
							    static long mod(long x,long y)
							        {
							            if(x<0)
							                x=x+(-x/y+1)*y;
							            return x%y;
							        }
							     public static  long pow(long b, long e) {
							                long r = 1;
							                while (e > 0) {
							                    if (e % 2 == 1) r = r * b ;
							                    b = b * b;
							                    e >>= 1;
							                }
							                return r;
							            }
							    private static void sort(long[] arr) {
							            List<Long> list = new ArrayList<>();
							            for (long object : arr) list.add(object);
							            Collections.sort(list);
							        //Collections.reverse(list);
							            for (int i = 0; i < list.size(); ++i) arr[i] = list.get(i);
							        }
							    private static void sort2(long[] arr) {
							            List<Long> list = new ArrayList<>();
							            for (Long object : arr) list.add(object);
							            Collections.sort(list);
							        Collections.reverse(list);
							            for (int i = 0; i < list.size(); ++i) arr[i] = list.get(i);
							        }
							     static class FastScanner
					{
					    private int BS = 1 << 16;
					    private char NC = (char) 0;
					    private byte[] buf = new byte[BS];
					    private int bId = 0, size = 0;
					    private char c = NC;
					    private double cnt = 1;
					    private BufferedInputStream in;
					 
					    public FastScanner() {
					        in = new BufferedInputStream(System.in, BS);
					    }
					 
					    public FastScanner(String s) {
					        try {
					            in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
					        } catch (Exception e) {
					            in = new BufferedInputStream(System.in, BS);
					        }
					    }
					 
					    private char getChar() {
					        while (bId == size) {
					            try {
					                size = in.read(buf);
					            } catch (Exception e) {
					                return NC;
					            }
					            if (size == -1) return NC;
					            bId = 0;
					        }
					        return (char) buf[bId++];
					    }
					 
					    public int nextInt() {
					        return (int) nextLong();
					    }
					 
					    public int[] nextInts(int N) {
					        int[] res = new int[N];
					        for (int i = 0; i < N; i++) {
					            res[i] = (int) nextLong();
					        }
					        return res;
					    }
					 
					    public long[] nextLongs(int N) {
					        long[] res = new long[N];
					        for (int i = 0; i < N; i++) {
					            res[i] = nextLong();
					        }
					        return res;
					    }
					 
					    public long nextLong() {
					        cnt = 1;
					        boolean neg = false;
					        if (c == NC) c = getChar();
					        for (; (c < '0' || c > '9'); c = getChar()) {
					            if (c == '-') neg = true;
					        }
					        long res = 0;
					        for (; c >= '0' && c <= '9'; c = getChar()) {
					            res = (res << 3) + (res << 1) + c - '0';
					            cnt *= 10;
					        }
					        return neg ? -res : res;
					    }
					 
					    public double nextDouble() {
					        double cur = nextLong();
					        return c != '.' ? cur : cur + nextLong() / cnt;
					    }
					 
					    public double[] nextDoubles(int N) {
					        double[] res = new double[N];
					        for (int i = 0; i < N; i++) {
					            res[i] = nextDouble();
					        }
					        return res;
					    }
					 
					    public String next() {
					        StringBuilder res = new StringBuilder();
					        while (c <= 32) c = getChar();
					        while (c > 32) {
					            res.append(c);
					            c = getChar();
					        }
					        return res.toString();
					    }
					 
					    public String nextLine() {
					        StringBuilder res = new StringBuilder();
					        while (c <= 32) c = getChar();
					        while (c != '\n') {
					            res.append(c);
					            c = getChar();
					        }
					        return res.toString();
					    }
					 
					    public boolean hasNext() {
					        if (c > 32) return true;
					        while (true) {
					            c = getChar();
					            if (c == NC) return false;
					            else if (c > 32) return true;
					        }
					    }
					}

							     static class Pair implements Comparable<Pair>{
							            public long x, y,z;
							            public Pair(long x1, long y1,long z1) {
							                x=x1;
							                y=y1;
							                z=z1;
							            }
							             public Pair(long x1, long y1) {
							                x=x1;
							                y=y1;
							    
							            }
							            
							            @Override
							            public int hashCode() {
							                return (int)(x + 31 * y);
							            }
							            public String toString() {
							                return x + " " + y+" "+z;
							            }
							            @Override
							            public boolean equals(Object o){
							                if (o == this) return true;
							                if (o.getClass() != getClass()) return false;
							                Pair t = (Pair)o;
							                return t.x == x && t.y == y&&t.z==z;
							            }
							    public int compareTo(Pair o)
							    {
							    	
							   if(z==o.z)
							   	return (int)(y-o.y);
							    	return (int)(z-o.z);
							     
							        }
							     
							    }
							    
							    }

							     
