#include <bits/stdc++.h>
using namespace std;
const long long M = 998244353;
const long long MAX = (2e5) + 10;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int n, k;
string s;
int finNormal() {
  vector<int> id;
  for (long long i = 1; i <= n - 1; i++) {
    id.push_back(i);
  }
  shuffle(id.begin(), id.end(), rng);
  id.resize(min(15, n - 1));
  int ret = 0;
  for (int x : id) {
    cout << "? 1 1" << endl;
    cout << x + 1 << endl << ret + 1 << endl;
    cin >> s;
    if (s == "FIRST") {
      ret = x;
    }
  }
  return ret;
}
void solve() {
  int mx = 0;
  cin >> n >> k;
  int nor = finNormal();
  if (!nor) {
    int jump = 1, p = 1, c = 35;
    while (jump && c--) {
      if (p + jump >= n) {
        jump /= 2;
        continue;
      }
      cout << "? " << jump << " " << jump << endl;
      for (int i = 0; i < jump; i++) {
        cout << i + 1 << " ";
      }
      cout << endl;
      for (int i = 0; i < jump; i++) {
        cout << p + i + 1 << " ";
      }
      cout << endl;
      cin >> s;
      if (s == "EQUAL") {
        p += jump;
        jump += jump;
      } else {
        jump /= 2;
      }
    }
    cout << "! " << p + 1 << endl;
  } else {
    cout << "! " << 1 << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  int tc;
  cin >> tc;
  for (long long tt = 1; tt <= tc; tt++) {
    solve();
  }
  return 0;
}
