#include <bits/stdc++.h>
using namespace std;
char s[10000];
bool vis[1005];
int par[1005];
vector<int> g[1005];
pair<int, int> ask(vector<int> &v) {
  printf("? %d ", int(v.size()));
  for (int i = 0; i < int(v.size()); i++) printf("%d ", v[i]);
  printf("\n");
  fflush(stdout);
  int u, d;
  scanf("%d%d", &u, &d);
  return make_pair(u, d);
}
int D[1005];
vector<int> D2[1005];
int mx = 0;
void dfs(int u, int p = 0, int d = 0) {
  par[u] = p;
  D[u] = d;
  mx = max(mx, d);
  D2[d].emplace_back(u);
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (v != p) dfs(v, u, d + 1);
  }
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    mx = 0;
    int n;
    scanf("%d", &n);
    for (int i = 0; i <= n; i++) {
      g[i].clear();
      D[i] = 0;
      D2[i].clear();
      vis[i] = 0;
      par[i] = 0;
    }
    for (int i = 1; i <= n - 1; i++) {
      int a, b;
      scanf("%d%d", &a, &b);
      g[a].emplace_back(b);
      g[b].emplace_back(a);
    }
    vector<int> v;
    for (int i = 1; i <= n; i++) v.emplace_back(i);
    pair<int, int> x = ask(v);
    int r = x.first, d = x.second;
    dfs(r);
    int lo = 0, hi = mx, ans;
    while (lo <= hi) {
      int mid = (lo + hi) / 2;
      pair<int, int> x = ask(D2[mid]);
      if (x.second == d)
        ans = x.first, lo = mid + 1;
      else
        hi = mid - 1;
    }
    if (D[ans] == d) {
      printf("! %d %d\n", ans, r);
      fflush(stdout);
    } else {
      int d2 = d - D[ans];
      int u = ans;
      while (u != 0) {
        vis[u] = 1;
        u = par[u];
      }
      vector<int> v;
      for (int i = 0; i < int(D2[d2].size()); i++) {
        int u = D2[d2][i];
        if (vis[u]) continue;
        v.emplace_back(u);
      }
      pair<int, int> x = ask(v);
      printf("! %d %d\n", ans, x.first);
      fflush(stdout);
    }
    scanf("%s", s);
    if (s[0] == 'I') break;
  }
}
