#include <bits/stdc++.h>
using namespace std;
using lli = long long;
using lld = long double;
using ulli = unsigned long long int;
using pll = pair<lli, lli>;
using ttt = pair<lli, pll>;
using vttt = vector<ttt>;
using vll = vector<pll>;
using vl = vector<lli>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using cd = complex<lld>;
const double PI = acos(-1);
vvi adj, dist;
pll get(vi vect) {
  cout << "? " << ((lli)(vect).size());
  for (auto& x : vect) cout << " " << x;
  cout << '\n';
  cout.flush();
  pll ans;
  cin >> ans.first >> ans.second;
  return ans;
}
void dfs(int v, int p, int dis) {
  dist[dis].push_back(v);
  for (auto& x : adj[v])
    if (x != p) {
      dfs(x, v, dis + 1);
    }
}
pll check(int val) {
  if (dist[val].empty()) return {1000000007, 1000000007};
  return get(dist[val]);
}
int tejas_919(int kkkk) {
  lli n, m, k, q, u, v, temp = 0, ans = 0;
  cin >> n;
  adj = vvi(n + 2);
  dist = vvi(n + 2);
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  int root, pdist;
  {
    vi vect;
    for (int i = 1; i < n + 1; i++) vect.push_back(i);
    tie(root, pdist) = get(vect);
  }
  dfs(root, root, 0);
  int l = (pdist + 1) / 2, r = pdist + 1, cdis;
  root = -1;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    tie(temp, cdis) = check(mid);
    if (cdis == pdist) {
      l = mid;
      root = temp;
    } else
      r = mid;
  }
  if (root < 0) root = get(dist[l]).first;
  dist = vvi(n + 2);
  dfs(root, root, 0);
  ans = get(dist[pdist]).first;
  cout << "! " << root << " " << ans << '\n';
  cout.flush();
  string s;
  cin >> s;
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << fixed << setprecision(10);
  int t = 1;
  cin >> t;
  for (int i = 0; i < t; i++) {
    tejas_919(i + 1);
  }
  {};
}
