Problem: Note that the only difference between the easy and hard version is the constraint on the number of queries. You can make hacks only if all versions of the problem are solved.

This is an interactive problem.

You are given a tree consisting of n nodes numbered with integers from 1 to n. Ayush and Ashish chose two secret distinct nodes in the tree. You need to find out both the nodes. You can make the following query: 

  * Provide a list of nodes and you will receive a node from that list whose sum of distances to both the hidden nodes is minimal (if there are multiple such nodes in the list, you will receive any one of them). You will also get the sum of distances of that node to the hidden nodes. 



Recall that a tree is a connected graph without cycles. The distance between two nodes is defined as the number of edges in the simple path between them.

More formally, let's define two hidden nodes as s and f. In one query you can provide the set of nodes \\{a_1, a_2, …, a_c\} of the tree. As a result, you will get two numbers a_i and dist(a_i, s) + dist(a_i, f). The node a_i is any node from the provided set, for which the number dist(a_i, s) + dist(a_i, f) is minimal.

You can ask no more than 14 queries.

Input

The first line contains a single integer t (1 ≤ t ≤ 10) — the number of test cases. Please note, how the interaction process is organized.

The first line of each test case consists of a single integer n (2 ≤ n ≤ 1000) — the number of nodes in the tree.

The next n - 1 lines consist of two integers u, v (1 ≤ u, v ≤ n, u ≠ v) — the edges of the tree.

Interaction

To ask a query print a single line: 

  * In the beginning print "? c " (without quotes) where c (1 ≤ c ≤ n) denotes the number of nodes being queried, followed by c distinct integers in the range [1, n] — the indices of nodes from the list. 



For each query, you will receive two integers x, d — the node (among the queried nodes) with the minimum sum of distances to the hidden nodes and the sum of distances from that node to the hidden nodes. If the subset of nodes queried is invalid or you exceeded the number of queries then you will get x = d = -1. In this case, you should terminate the program immediately.

When you have guessed the hidden nodes, print a single line "! " (without quotes), followed by two integers in the range [1, n] — the hidden nodes. You can output the hidden nodes in any order.

After this, you should read a string. If you guess the nodes correctly, you will receive the string "Correct". In this case, you should continue solving the remaining test cases or terminate the program, if all test cases were solved. Otherwise, you will receive the string "Incorrect". In this case, you should terminate the program immediately.

Guessing the hidden nodes does not count towards the number of queries asked.

The interactor is not adaptive. The hidden nodes do not change with queries.

Do not forget to read the string "Correct" / "Incorrect" after guessing the hidden nodes.

You need to solve each test case before receiving the input for the next test case.

The limit of 14 queries applies to each test case and not to the entire input.

After printing a query do not forget to output the end of the line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use:

  * fflush(stdout) or cout.flush() in C++;
  * System.out.flush() in Java;
  * flush(output) in Pascal;
  * stdout.flush() in Python;
  * see the documentation for other languages.



Hacks

To hack the solution, use the following test format:

The first line should contain a single integer t (1 ≤ t ≤ 10) — the number of test cases. The description of the test cases follows.

The first line of each test case should contain a single integer n (2 ≤ n ≤ 1000) — the number of nodes in the tree. The second line should contain two distinct integers in the range [1, n] — the hidden nodes. The next n - 1 lines should contain two integers u, v (1 ≤ u, v ≤ n, u ≠ v) — the edges of the tree.

Example

Input


1
3
1 2
1 3

1 1

2 3

3 1

3 1

Correct

Output


? 1 1

? 1 2

? 1 3

? 2 2 3

! 1 3

Note

The tree from the first test is shown below, and the hidden nodes are 1 and 3.

<image>

Solution (in JAVA):

Solution:
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Map.Entry;

import java.util.Random;
import java.util.Scanner;
import java.util.TreeSet;

public final class CF_646_D2_D2
{


	static boolean verb=true;
	static void log(Object X){if (verb) System.err.println(X);}
	static void log(Object[] X){if (verb) {for (Object U:X) System.err.print(U+" ");System.err.println("");}}
	static void log(int[] X){if (verb) {for (int U:X) System.err.print(U+" ");System.err.println("");}}
	static void logWln(int[] X){if (verb) {for (int U:X) System.err.print(U+" ");}}
	static void log(int[] X,int L){if (verb) {for (int i=0;i<L;i++) System.err.print(X[i]+" ");System.err.println("");}}
	static void log(long[] X){if (verb) {for (long U:X) System.err.print(U+" ");System.err.println("");}}

	static void logWln(Object X){if (verb) System.err.print(X);}
	static void info(Object o){	System.out.println(o);}
	static void output(Object o){outputWln(""+o+"\n");	}
	static void outputFlush(Object o){try {out.write(""+ o+"\n");out.flush();} catch (Exception e) {}}
	static void outputWln(Object o){try {out.write(""+ o);} catch (Exception e) {}}


	static void logBin(int[] tm) {for (int x:tm) logWln(bin(8,x)+" ");log("");}

	static String bin(int L,int x) {
		String s=Integer.toBinaryString(x);
		while (s.length()<L) s="0"+s;
		return s;
	}

	static long powerMod(long b,long e,long m){
		long x=1;
		while (e>0) {
			if (e%2==1)
				x=(b*x)%m;
			b=(b*b)%m;
			e=e/2;
		}
		return x; 
	}


	static class Composite implements Comparable<Composite>{

		int val;
		int idx;


		public int compareTo(Composite X) {
			if (val!=X.val)
				return val-X.val;
			return idx-X.idx;
		}


		public Composite(int val, int idx) {
			this.val = val;
			this.idx = idx;
		}







	}

	
	static void solve(int n,int l,int r,int[][] S,int[] rem,int bigMax) {
		//log("solve rec");
		if (l==r) {
			// nothing to do
			// take the complimentary
		
			System.out.print("? "+(n-S[l].length)+" ");
			for (int i=0;i<S.length;i++) {
				if (i!=l)
					for (int x:S[i])
						System.out.print((x+1)+" ");
			}
			for (int x:rem)
				System.out.print((x+1)+" ");
			System.out.println();
			System.out.flush();
			int altMax=sc.nextInt();
			System.out.print("! ");
			for (int i=0;i<S.length;i++) {
				if (i==l)
					System.out.print(altMax+" ");
				else
					System.out.print(Math.max(bigMax,altMax)+" ");
			}
			System.out.println();
			System.out.flush();
			String verdict=sc.next();
			
			return;
		}
		int mid=(l+r)/2;
		int sz=0;
		for (int i=0;i<=mid;i++) {
			sz+=S[i].length;
		}
		System.out.print("? "+sz+" ");
		for (int i=0;i<=mid;i++) {
			for (int x:S[i])
				System.out.print((x+1)+" ");
		}
		System.out.println();
		System.out.flush();
		int quer=sc.nextInt();
		if (quer==bigMax)
			solve(n,l,mid,S,rem,bigMax);
		else
			solve(n,mid+1,r,S,rem,bigMax);
	}
	static void solve(int n,int[][] S,int[] rem) {
		// is the max in rem ?
		// if so we are done
		// otherwise, more action
		int k=S.length;
		log("query global");
		System.out.print("? "+n+" ");
		for (int i=0;i<n;i++)
			System.out.print((i+1)+" ");
		System.out.println();
		System.out.flush();
		int bigMax=sc.nextInt();

		// now iterate
		solve(n,0,k-1,S,rem,bigMax);
	}
	
	// Global vars
	static BufferedWriter out;
	static InputReader reader;

	static int[][] dd={{-1,0},{0,1},{1,0},{0,-1}};

	static long MX=1000000001;

	static long mod=1000000007;

	static Scanner sc;
	
	static void process() throws Exception {

		//out = new BufferedWriter(new OutputStreamWriter(System.out));
		//reader = new InputReader(System.in);
		sc=new Scanner(System.in);

		int T=sc.nextInt();
		for (int t=0;t<T;t++) {
			int n=sc.nextInt();
			int k=sc.nextInt();
			int[][] S=new int[k][];
			int[] mem=new int[n];
			int tot=0;
			for (int i=0;i<k;i++) {
				int c=sc.nextInt();
				log("c:"+c);
				tot+=c;
				S[i]=new int[c];
				for (int j=0;j<c;j++) {
					S[i][j]=sc.nextInt()-1;
					mem[S[i][j]]=1;
				}
			
			}
			
			int[] rem=new int[n-tot];
			//log("rem.size:"+rem.length);
			int st=0;
			for (int u=0;u<n;u++)
				if (mem[u]==0)
					rem[st++]=u;
			solve(n,S,rem);
			
			
		}

		/*
		try {
			out.close();
		} catch (Exception Ex) {
		}
		*/

	}




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

	}

	static final class InputReader {
		private final InputStream stream;
		private final byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		private int read() throws IOException {
			if (curChar >= numChars) {
				curChar = 0;
				numChars = stream.read(buf);
				if (numChars <= 0) {
					return -1;
				}
			}
			return buf[curChar++];
		}

		public final String readString() throws IOException {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.append((char) c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public final String readString(int L) throws IOException {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder(L);
			do {
				res.append((char) c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public final int readInt() throws IOException {
			int c = read();
			boolean neg = false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d = (char) c;
			// log("d:"+d);
			if (d == '-') {
				neg = true;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			// log("res:"+res);
			if (neg)
				return -res;
			return res;

		}

		public final long readLong() throws IOException {
			int c = read();
			boolean neg = false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d = (char) c;
			// log("d:"+d);
			if (d == '-') {
				neg = true;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			// log("res:"+res);
			if (neg)
				return -res;
			return res;

		}

		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
	}

}