#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10;
vector<int> e[N], dep[N], now;
char s[20];
int t, n, u, v, dis, mx;
pair<int, int> tmp, las;
pair<int, int> ask(vector<int> &x) {
  printf("? %d", (int)x.size());
  for (int v : x) {
    printf(" %d", v);
  }
  printf("\n");
  fflush(stdout);
  pair<int, int> ans;
  scanf("%d%d", &ans.first, &ans.second);
  return ans;
}
void dfs(int u, int fa, int y) {
  dep[y].push_back(u);
  mx = max(mx, y);
  for (int v : e[u]) {
    if (v == fa) continue;
    dfs(v, u, y + 1);
  }
}
int main() {
  scanf("%d", &(t));
  while (t--) {
    scanf("%d", &(n));
    now.clear();
    for (int i = (0); i <= (n); ++i) {
      dep[i].clear();
      e[i].clear();
      if (i) now.push_back(i);
    }
    for (int i = (2); i <= (n); ++i) {
      scanf("%d", &(u)), scanf("%d", &(v));
      e[u].push_back(v);
      e[v].push_back(u);
    }
    tmp = ask(now);
    u = tmp.first, dis = tmp.second;
    mx = 0;
    dfs(u, -1, 0);
    int l = (dis + 1) / 2, r = min(dis, mx);
    while (l <= r) {
      int mid = (l + r) / 2;
      tmp = ask(dep[mid]);
      if (tmp.second == dis)
        l = mid + 1, u = tmp.first;
      else
        r = mid - 1;
    }
    for (int i = (0); i <= (n); ++i) {
      dep[i].clear();
    }
    dfs(u, -1, 0);
    tmp = ask(dep[dis]);
    v = tmp.first;
    printf("! %d %d\n", u, v);
    fflush(stdout);
    scanf("%s", s);
    if (strcmp(s, "Correct") == 0) {
      continue;
    }
  }
  return 0;
}
