#include <bits/stdc++.h>
using namespace std;
bool ck(int sz, int L) {
  cout << "? " << sz << ' ' << sz << endl;
  for (int i = 1; i <= sz; i++) cout << i << ' ';
  cout << endl;
  for (int i = L; i < L + sz; i++) cout << i << ' ';
  cout << endl;
  string s;
  cin >> s;
  if (s == "FIRST") return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tc, n, k;
  cin >> tc;
  while (tc--) {
    cin >> n >> k;
    int flg = 0;
    string s;
    for (int i = 1; i <= 30; i++) {
      int x = rand() % (n - 1) + 2;
      cout << "? " << 1 << ' ' << 1 << endl;
      cout << 1 << endl;
      cout << x << endl;
      cin >> s;
      if (s == "SECOND") {
        flg = 1;
        break;
      }
    }
    if (flg) {
      cout << "! " << 1 << endl;
      continue;
    }
    int sz = 0, p = 0, L, R;
    bool rs;
    while (true) {
      sz = (1 << p);
      p++;
      if (2 * sz > n) {
        L = sz + 1, R = n;
        break;
      }
      rs = ck(sz, sz + 1);
      if (rs) {
        L = sz + 1, R = sz + sz;
        break;
      }
    }
    int x = 0;
    while (L <= R) {
      int md = (L + R) / 2;
      bool rs = ck(md - L + 1, L);
      if (rs)
        x = md, R = md - 1;
      else
        L = md + 1;
    }
    cout << "! " << x << endl;
  }
  return 0;
}
