#include <bits/stdc++.h>
using namespace std;
void Megold(int &l, int &r) {
  int s = 1, e = 2;
  string ans;
  while (l + e < r) {
    cout << "? " << s << " " << s << "\n";
    for (int i = l; i < l + s; i++) cout << i + 1 << endl;
    for (int i = l + s; i < l + e; i++) cout << i + 1 << endl;
    cin >> ans;
    if (ans == "FIRST") {
      l = l + s;
      r = l + e;
      return;
    }
    s *= 2;
    e *= 2;
  }
  l = l + s;
  return;
}
int main() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  srand(time(NULL));
  int t;
  cin >> t;
  while (t--) {
    int l = 0, r, k;
    cin >> r >> k;
    string ans;
    bool kesz = false;
    for (int i = 0; i < 20 && !kesz; i++) {
      int x = rand() % (r - 1) + 2;
      cout << "? 1 1" << endl;
      cout << "1" << endl;
      cout << x << endl;
      cin >> ans;
      if (ans == "SECOND") kesz = true;
    }
    if (kesz) {
      cout << "! 1" << endl;
      continue;
    }
    Megold(l, r);
    int x = 1;
    while (l + 2 * x < r) x *= 2;
    while (l + 1 < r) {
      if (l + x >= r) {
        x /= 2;
        continue;
      }
      cout << "? " << x << " " << x << endl;
      for (int i = 0; i < x; i++) cout << i + 1 << endl;
      for (int i = l; i < l + x; i++) cout << i + 1 << endl;
      cin >> ans;
      if (ans == "EQUAL") {
        r = min(r, l + 2 * x);
        l = l + x;
      } else
        r = l + x;
      x /= 2;
    }
    cout << "! " << l + 1 << endl;
  }
  return 0;
}
