#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int T, n, k;
mt19937 mt(time(0) + (size_t) new int);
bool vis[N];
bool check_1() {
  memset(vis, 0, n + 1);
  string st;
  for (int i = 1; i <= 20 && i < n; ++i) {
    int p = mt() % (n - 1) + 2;
    while (vis[p]) p = mt() % (n - 1) + 2;
    vis[p] = 1;
    cout << "? 1 1\n1\n" << p << endl;
    cin >> st;
    if (st == "SECOND") return 0;
  }
  return 1;
}
bool work(int l, int r) {
  int m = r - l + 1;
  cout << "? " << m << ' ' << m << '\n';
  for (int i = 1; i <= m; ++i) cout << i << ' ';
  cout << '\n';
  for (int i = l; i <= r; ++i) cout << i << ' ';
  cout << endl;
  string st;
  cin >> st;
  if (st == "EQUAL") return 0;
  if (st == "FIRST") {
    if (l == r) {
      cout << "! " << l << endl;
      return 1;
    }
    const int mid = (l + r) / 2;
    if (work(l, mid)) return 1;
    assert(work(mid + 1, r));
    return 1;
  }
  assert(1);
  return 0;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  for (cin >> T; T--;) {
    cin >> n >> k;
    if (!check_1()) {
      cout << "! 1" << endl;
      continue;
    }
    for (int len = 1, l = 2, r; l <= n; l = r + 1, len <<= 1) {
      r = l + len - 1;
      if (r > n) r = n;
      if (work(l, r)) break;
    }
  }
  return 0;
}
