#include <bits/stdc++.h>
using namespace std;
int T, n, k, f;
string s;
char ask(int l1, int r1, int l2, int r2) {
  cout << "? " << r1 - l1 + 1 << ' ' << r2 - l2 + 1 << endl;
  for (int i = l1; i <= r1; ++i) cout << i << ' ';
  cout << endl;
  for (int i = l2; i <= r2; ++i) cout << i << ' ';
  cout << endl;
  cout.flush();
  cin >> s;
  return s[0];
}
int main() {
  srand(time(0));
  cin >> T;
  while (T--) {
    cin >> n >> k;
    for (int i = 1; i <= 30; ++i) {
      int x = rand() % (n - 1) + 2;
      if (ask(1, 1, x, x) == 'S') {
        f = 1;
        break;
      }
    }
    if (f) {
      cout << "! " << 1 << endl;
      cout.flush();
      f = 0;
      continue;
    }
    int i = 1;
    for (; i * 2 <= n; i *= 2)
      if (ask(1, i, i + 1, i + i) != 'E') break;
    int l = i + 1, r = min(i * 2, n);
    while (l < r) {
      int mid = (l + r) >> 1;
      if (ask(1, 1 + mid - l, l, mid) == 'E')
        l = mid + 1;
      else
        r = mid;
    }
    cout << "! " << l << endl;
    cout.flush();
  }
  return 0;
}
