#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long INF = 1e18;
const long double PI = 4 * atan((long double)1);
int d[200005], d2[200005], par[200005], in[200005];
pair<int, int> rep[200005];
int in0[200005];
vector<int> G[200005];
pair<int, int> ask(vector<int>& query) {
  if (query.empty()) return {-1, -1};
  cout << "? " << query.size() << " ";
  for (auto temp : query) cout << temp << " ";
  cout << endl;
  fflush(stdout);
  query.clear();
  pair<int, int> re;
  cin >> re.first >> re.second;
  return re;
}
void ans(int a, int b) {
  cout << "! " << a << " " << b << endl;
  fflush(stdout);
}
void dfs(int u, int p) {
  d[u] = !p ? 0 : d[p] + 1;
  d2[u] = d[u];
  par[u] = p;
  for (auto v : G[u]) {
    if (v != p) {
      d[v] = d[u] + 1;
      dfs(v, u);
      d2[u] = max(d2[u], d2[v]);
    }
  }
}
void dfs2(int u, int p) {
  in0[u] = 1;
  for (auto v : G[u]) {
    if (v != p) dfs(v, u);
  }
}
signed main() {
  int t;
  cin >> t;
  while (t--) {
    int n, a, b;
    cin >> n;
    rep[0] = pair<int, int>();
    for (int i = 1; i <= n; i++) {
      d[i] = d2[i] = in[i] = in0[i] = par[i] = 0;
      rep[i] = pair<int, int>();
      G[i].clear();
    }
    vector<int> query;
    pair<int, int> re;
    for (int i = 1; i <= n - 1; i++) {
      int u, v;
      cin >> u >> v;
      G[u].emplace_back(v);
      G[v].emplace_back(u);
    }
    for (int i = 1; i <= n; i++) {
      query.emplace_back(i);
    }
    rep[0] = ask(query);
    int dist = rep[0].second, root = rep[0].first;
    dfs(root, 0);
    if (G[root].size() == 1) {
      a = root;
    } else {
      for (auto v : G[root])
        if (d2[v] >= (n + 1) / 2) {
          dfs2(v, root);
        }
      int md = 0;
      for (int i = 1; i <= n; i++)
        if (!in0[i]) md = max(md, d[i]);
      int ll = 0, rr = md;
      while (ll < rr) {
        int mid = (ll + rr + 1) / 2;
        for (int i = 1; i <= n; i++)
          if (d[i] == mid and !in0[i]) query.emplace_back(i);
        rep[mid] = ask(query);
        if (rep[mid].first != -1 and rep[mid].second == dist)
          ll = mid;
        else
          rr = mid - 1;
      }
      a = rep[ll].first;
    }
    int tempp = a;
    while (tempp != root) {
      in[tempp] = 1;
      tempp = par[tempp];
    }
    for (int i = 1; i <= n; i++)
      if (!in[i] and d[i] == dist - d[a]) query.emplace_back(i);
    rep[dist - d[a]] = ask(query);
    b = rep[dist - d[a]].first;
    ans(a, b);
    string verdict;
    cin >> verdict;
    if (verdict != "Correct") return 0;
  }
}
