#include <bits/stdc++.h>
using namespace std;
long long ask(long long l1, long long r1, long long l2, long long r2) {
  cout << "? " << (r1 - l1 + 1) << " " << (r2 - l2 + 1) << endl;
  for (long long i = l1; i <= r1; i++) cout << i + 1 << " ";
  cout << endl;
  for (long long i = l2; i <= r2; i++) cout << i + 1 << " ";
  cout << endl;
  string r;
  cin >> r;
  if (r == "EQUAL") return 0;
  if (r == "FIRST") return -1;
  if (r == "SECOND") return 1;
  exit(0);
}
void solve() {
  long long n, k;
  cin >> n >> k;
  set<long long> s;
  while (s.size() < min(n - 1, 10ll)) s.insert(rand() % (n - 1) + 1);
  while (!s.empty()) {
    if (ask(0, 0, *s.begin(), *s.begin()) == 1) {
      cout << "! " << 1 << endl;
      return;
    }
    s.erase(s.begin());
  }
  long long m = 1;
  while (true) {
    if (ask(0, min(m, n - m) - 1, m, m + min(m, n - m) - 1) != 0) break;
    m *= 2;
  }
  long long l = m, r = min(2 * m, n);
  while (r - l > 1) {
    long long mi = (l + r) / 2;
    if (ask(0, mi - l - 1, l, mi - 1) == 0)
      l = mi;
    else
      r = mi;
  }
  cout << "! " << l + 1 << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  srand(time(NULL));
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
