#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n, rt, v;
vector<int> e[maxn];
vector<int> d[maxn];
string str;
void Output1() {
  cout << "? " << n;
  for (int i = 1; i <= n; ++i) cout << " " << i;
  cout << endl;
  cout.flush();
}
void Output2(int dis, int ignore_node) {
  int sz = 0;
  for (auto x : d[dis])
    if (x != ignore_node) ++sz;
  cout << "? " << sz;
  for (auto x : d[dis])
    if (x != ignore_node) cout << " " << x;
  cout << endl;
  cout.flush();
}
void dfs(int x, int fa, int dis) {
  d[dis].push_back(x);
  for (int i = 0; i < e[x].size(); ++i) {
    int y = e[x][i];
    if (y == fa) continue;
    dfs(y, x, dis + 1);
  }
}
void task() {
  cin >> n;
  for (int i = 0; i <= n; ++i) e[i].clear(), d[i].clear();
  for (int i = 1; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    e[x].push_back(y);
    e[y].push_back(x);
  }
  Output1();
  cin >> rt >> v;
  if (v == 0) {
    cout << "! " << rt << " " << rt << endl;
    cout.flush();
    return;
  }
  dfs(rt, 0, 0);
  int left = (v + 1) / 2, right = v;
  while (d[right].size() == 0) --right;
  int ans1, ans2;
  int p, q;
  while (left <= right) {
    int mid = (left + right) / 2;
    Output2(mid, -1);
    cin >> p >> q;
    if (q > v)
      right = mid - 1;
    else {
      left = mid + 1;
      ans1 = p;
    }
  }
  for (int i = 0; i <= n; ++i) d[i].clear();
  dfs(ans1, 0, 0);
  Output2(v, -1);
  cin >> p >> q;
  assert(q == v);
  ans2 = p;
  cout << "! " << ans1 << " " << ans2 << endl;
  cout.flush();
}
int main() {
  int T;
  cin >> T;
  while (T--) {
    task();
    cin >> str;
  }
}
