#include <bits/stdc++.h>
using namespace std;
const int mxn = 1e3 + 5;
const int mod = 1e9 + 7;
const int mod1 = 998244353;
vector<vector<int> > g, d;
void dfs(int i, int p, int c) {
  d[c].push_back(i);
  for (int j : g[i])
    if (j - p) dfs(j, i, c + 1);
}
pair<int, int> ask(int x) {
  if (d[x].empty()) return make_pair(0, 0);
  cout << "? " << (int)d[x].size() << " ";
  for (int j : d[x]) cout << j << " ";
  cout << endl;
  int a, b;
  cin >> a >> b;
  return make_pair(a, b);
}
void init(int n) {
  g.clear();
  g.resize(n + 1);
  d.clear();
  d.resize(n + 1);
}
void solve() {
  int n, i, a, b, s, x;
  cin >> n;
  init(n);
  for (i = 1; i < n; i++) cin >> a >> b, g[a].push_back(b), g[b].push_back(a);
  cout << "? " << n << " ";
  for (i = 1; i <= n; i++) cout << i << " ";
  cout << endl;
  cin >> s >> x;
  dfs(s, 0, 0);
  int l = (x + 1) / 2, r = x, mid;
  while (l <= r) {
    mid = (l + r) / 2;
    pair<int, int> ans = ask(mid);
    if (ans.second > x || ans.second == 0)
      r = mid - 1;
    else
      l = mid + 1, s = ans.first;
  }
  d.clear();
  d.resize(n + 1);
  dfs(s, 0, 0);
  pair<int, int> ans = ask(x);
  cout << "! " << s << " " << ans.first << endl;
  string st;
  cin >> st;
}
int main() {
  ios_base::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) solve();
}
