Problem: Phoenix loves beautiful arrays. An array is beautiful if all its subarrays of length k have the same sum. A subarray of an array is any sequence of consecutive elements.

Phoenix currently has an array a of length n. He wants to insert some number of integers, possibly zero, into his array such that it becomes beautiful. The inserted integers must be between 1 and n inclusive. Integers may be inserted anywhere (even before the first or after the last element), and he is not trying to minimize the number of inserted integers.

Input

The input consists of multiple test cases. The first line contains an integer t (1 ≤ t ≤ 50) — the number of test cases.

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

The second line of each test case contains n space-separated integers (1 ≤ a_i ≤ n) — the array that Phoenix currently has. This array may or may not be already beautiful.

Output

For each test case, if it is impossible to create a beautiful array, print -1. Otherwise, print two lines.

The first line should contain the length of the beautiful array m (n ≤ m ≤ 10^4). You don't need to minimize m.

The second line should contain m space-separated integers (1 ≤ b_i ≤ n) — a beautiful array that Phoenix can obtain after inserting some, possibly zero, integers into his array a. You may print integers that weren't originally in array a.

If there are multiple solutions, print any. It's guaranteed that if we can make array a beautiful, we can always make it with resulting length no more than 10^4.

Example

Input


4
4 2
1 2 2 1
4 3
1 2 2 1
3 2
1 2 3
4 4
4 3 4 2


Output


5
1 2 1 2 1
4
1 2 2 1
-1
7
4 3 2 1 4 3 2

Note

In the first test case, we can make array a beautiful by inserting the integer 1 at index 3 (in between the two existing 2s). Now, all subarrays of length k=2 have the same sum 3. There exists many other possible solutions, for example: 

  * 2, 1, 2, 1, 2, 1 
  * 1, 2, 1, 2, 1, 2 



In the second test case, the array is already beautiful: all subarrays of length k=3 have the same sum 5.

In the third test case, it can be shown that we cannot insert numbers to make array a beautiful.

In the fourth test case, the array b shown is beautiful and all subarrays of length k=4 have the same sum 10. There exist other solutions also.

Solution (in JAVA):

Solution:

import java.util.*;
import java.lang.*;
import java.io.*;

public class feb20 {

//	            ***                          ++                      
//             +=-==+                      +++=-                     
//            +-:---==+                   *+=----=                   
//           +-:------==+               ++=------==                  
//           =-----------=++=========================                
//          +--:::::---:-----============-=======+++====             
//          +---:..:----::-===============-======+++++++++           
//          =---:...---:-===================---===++++++++++         
//          +----:...:-=======================--==+++++++++++        
//          +-:------====================++===---==++++===+++++      
//         +=-----======================+++++==---==+==-::=++**+     
//        +=-----================---=======++=========::.:-+*****    
//       +==::-====================--:  --:-====++=+===:..-=+*****   
//       +=---=====================-...  :=..:-=+++++++++===++*****  
//       +=---=====+=++++++++++++++++=-:::::-====+++++++++++++*****+ 
//      +=======++++++++++++=+++++++============++++++=======+****** 
//      +=====+++++++++++++++++++++++++==++++==++++++=:...  . .+**** 
//     ++====++++++++++++++++++++++++++++++++++++++++-.     ..-+**** 
//     +======++++++++++++++++++++++++++++++++===+====:.    ..:=++++ 
//     +===--=====+++++++++++++++++++++++++++=========-::....::-=++* 
//     ====--==========+++++++==+++===++++===========--:::....:=++*  
//     ====---===++++=====++++++==+++=======-::--===-:.  ....:-+++   
//     ==--=--====++++++++==+++++++++++======--::::...::::::-=+++    
//     ===----===++++++++++++++++++++============--=-==----==+++     
//     =--------====++++++++++++++++=====================+++++++     
//     =---------=======++++++++====+++=================++++++++     
//     -----------========+++++++++++++++=================+++++++    
//     =----------==========++++++++++=====================++++++++  
//     =====------==============+++++++===================+++==+++++ 
//     =======------==========================================++++++

	// created by : Nitesh Gupta

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

//		first();
//		sec();
//		third();
//		four();
		fif();
//			six();
	}

	private static void first() throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] scn = (br.readLine()).trim().split(" ");
		StringBuilder sb = new StringBuilder();

		int n = Integer.parseInt(scn[0]);
		int m = Integer.parseInt(scn[1]);
		int k = Integer.parseInt(scn[2]);
		for (int i = 0; i < k + k; i++) {
			scn = (br.readLine()).trim().split(" ");
		}
		for (int i = 1; i < n; i++) {
			sb.append("U");
		}
		for (int i = 1; i < m; i++) {
			sb.append("L");
		}

		for (int i = 0; i < m; i++) {
			sb.append("R");
		}
		for (int i = 1; i < n; i++) {

			if (i % 2 == 0) {
				sb.append("D");
				for (int j = 1; j < m; j++) {
					sb.append("R");
				}
			} else {
				sb.append("D");
				for (int j = 1; j < m; j++) {
					sb.append("L");
				}
			}
		}
		System.out.println(n - 1 + m - 1 + n * m);
		System.out.println(sb);
		return;
	}

	private static void sec() throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] scn = (br.readLine()).trim().split(" ");
		int t = Integer.parseInt(scn[0]);
		StringBuilder sb = new StringBuilder();

		while (t-- > 0) {
			scn = (br.readLine()).trim().split(" ");
			long n = Integer.parseInt(scn[0]);
			long k = Integer.parseInt(scn[1]);
			long sum = k * k;
			sum = n - sum;
			if (sum >= 0 && sum % 2 == 0) {
				sb.append("YES");
			} else {
				sb.append("NO");
			}

			sb.append("\n");
		}
		System.out.println(sb);
		return;
	}

	private static void third() throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] scn = (br.readLine()).trim().split(" ");
		int t = Integer.parseInt(scn[0]);
		StringBuilder sb = new StringBuilder();

		while (t-- > 0) {
			scn = (br.readLine()).trim().split(" ");
			int n = Integer.parseInt(scn[0]);
			ArrayList<HashSet<Integer>> list = new ArrayList<>();
			for (int i = 0; i < n; i++) {
				list.add(new HashSet<>());
			}
			boolean[] marr = new boolean[n + 1];
			boolean[] does = new boolean[n + 1];
			boolean opt = true;
			for (int i = 0; i < n; i++) {
				scn = (br.readLine()).trim().split(" ");
				int k = (int) Long.parseLong(scn[0]);
				for (int j = 1; j <= k; j++) {
					int king = (int) Long.parseLong(scn[j]);
					if (marr[king])
						continue;
					else {
						does[i + 1] = true;
						marr[king] = true;
						break;
					}
				}

			}
			int leftd = 0;
			for (int ii = 1; ii <= n; ii++) {
				if (!does[ii]) {
					leftd = ii;
					break;
				}
			}
			int leftk = 0;
			for (int ii = 1; ii <= n; ii++) {
				if (!marr[ii]) {
					leftk = ii;
					break;
				}

			}
			if (leftd == 0) {
				sb.append("OPTIMAL");
			} else {
				sb.append("IMPROVE\n");
				sb.append(leftd + " " + leftk);

			}

			sb.append("\n");
		}
		System.out.println(sb);
		return;

	}

	private static void four() throws Exception {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] scn = (br.readLine()).trim().split(" ");
		int t = Integer.parseInt(scn[0]);
		StringBuilder sb = new StringBuilder();
		int x = 1;
		while (t-- > 0) {
			scn = (br.readLine()).trim().split(" ");
			int n = Integer.parseInt(scn[0]);
			int k = Integer.parseInt(scn[1]);
			char[] str = br.readLine().toCharArray();
			Arrays.sort(str);
			if (k == 1) {
				for (char ch : str) {
					sb.append(ch);
				}
			} else {
				HashSet<Character> set = new HashSet<>();
				int c = 1;
				int count = 0;
				int flag = -1;
				set.add(str[0]);
				for (int i = 1; i < n; i++) {
					if (str[i] == str[i - 1]) {
						c += 1;
					} else {
						if (flag == -1) {
							flag = 1;
							count = c;
						}
					}
					set.add(str[i]);

				}
				if (set.size() == 1) {
					int left = n - k;
					int times = (left + k - 1) / k;
					sb.append(str[0]);
					for (int i = 0; i < times; i++) {
						sb.append(str[n - 1]);
					}

				} else if (count < k) {
					sb.append(str[k - 1]);
				} else if (count > k) {
					for (int i = k - 1; i < n; i++) {
						sb.append(str[i]);
					}
				} else {
					if (set.size() <= 2) {
						int left = n - k;
						int times = (left + k - 1) / k;
						sb.append(str[0]);
						for (int i = 0; i < times; i++) {
							sb.append(str[n - 1]);
						}
					} else {
						for (int i = k - 1; i < n; i++) {
							sb.append(str[i]);
						}
					}
				}

			}
			x++;
			sb.append("\n");
		}
		System.out.println(sb);
		return;
	}

	private static void fif() throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] scn = (br.readLine()).trim().split(" ");
		int t = Integer.parseInt(scn[0]);
		StringBuilder sb = new StringBuilder();

		while (t-- > 0) {
			scn = (br.readLine()).trim().split(" ");
			int n = Integer.parseInt(scn[0]);
			int k = Integer.parseInt(scn[1]);
			long[] arr = new long[n];
			scn = (br.readLine()).trim().split(" ");
			for (int i = 0; i < n; i++) {
				arr[i] = Long.parseLong(scn[i]);
			}
			HashSet<Long> inc = new HashSet<>();
			for (int i = 0; i < k; i++) {
				if (inc.contains(arr[i])) {
					for (int j = i + 1; j < n; j++) {
						if (arr[i] != arr[j] && !inc.contains(arr[j])) {
							long temp = arr[i];
							arr[i] = arr[j];
							arr[j] = temp;
							break;
						}
					}
				}
				inc.add(arr[i]);
			}
			int i = 0;
			int j = 0;
			ArrayList<Long> list = new ArrayList<>();
			for (i = 0; i < k; i++) {
				list.add(arr[i]);
				j += 1;
			}
			boolean pos = true;
			while (i < n) {
				boolean contains = false;
				int idx = -1;
				for (int search = list.size() - 1; search >= list.size() - k; search--) {
					if (list.get(search).longValue() == arr[i]) {
						contains = true;
						idx = search;
						break;
					}
				}

				if (!contains) {
					pos = false;
					break;
				}

				for (int travel = list.size() - k; travel <= idx; travel++) {
					list.add(list.get(travel));
				}
				i += 1;

			}
			for (int rep = 0; rep < k&&list.size()+k<10000; rep++) {
				int size = list.size();
				for (i = size - k; i <= size - 1; i++)
					list.add(list.get(i));
			}

			if (pos) {
				sb.append(list.size() + "\n");
				for (long ele : list)
					sb.append(ele + " ");
			} else {
				sb.append("-1");
			}

			sb.append("\n");
		}
		System.out.println(sb);
		return;
	}

	private static void six() throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] scn = (br.readLine()).trim().split(" ");
		int t = Integer.parseInt(scn[0]);
		StringBuilder sb = new StringBuilder();

		while (t-- > 0) {
			scn = (br.readLine()).trim().split(" ");
			int n = Integer.parseInt(scn[0]);
			long[] arr = new long[n];
			scn = (br.readLine()).trim().split(" ");
			for (int i = 0; i < n; i++) {
				arr[i] = Long.parseLong(scn[i]);
			}

			sb.append("\n");
		}
		System.out.println(sb);
		return;
	}

	public static void sort(long[] arr) {
		int n = arr.length;
		for (int i = 0; i < n; i++) {
			int idx = (int) Math.random() * n;
			long temp = arr[i];
			arr[i] = arr[idx];
			arr[idx] = temp;
		}
		Arrays.sort(arr);
	}

	public static void print(long[][] dp) {
		for (long[] a : dp) {
			for (long ele : a) {
				System.out.print(ele + " ");
			}
			System.out.println();
		}
	}

}