#include <bits/stdc++.h>
using namespace std;
int T, n;
char ans[55];
bool ask(string s) {
  cout << "? " << s << endl;
  int k, x;
  bool ok;
  for (cin >> k, ok = k; k--;) {
    cin >> x;
    for (int i = 0; i < s.length(); ++i) ans[x + i - 1] = s[i];
  }
  return ok;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> T;
  while (T--) {
    cin >> n;
    memset(ans, 0, sizeof ans), ask("CC"), ask("CH"), ask("CO");
    if (n == 4) {
      if (ans[3]) {
        if (!ans[1]) {
          ask("HC");
          if (!ans[1]) ans[1] = 'O';
        }
        if (!ans[0]) {
          ask((string) "H" + ans[1]);
          if (!ans[0]) ans[0] = 'O';
        }
      } else if (!ans[0] && !ans[1] && !ans[2]) {
        if (ask("HO")) {
          if (ans[2] == 'H' && ans[3] == 'O') {
            if (!ans[0] || !ans[1]) {
              ask("HHHO"), ask("OOHO");
              if (!ans[0] && !ans[1]) ans[0] = 'O', ans[1] = 'H';
            }
          } else if (ans[1] == 'H' && ans[2] == 'O') {
            ask("HHOH"), ask("HHOO"), ask("HHOC"), ask("OHOH"), ask("OHOO");
            if (!ans[3]) ans[0] = 'O', ans[3] = 'C';
          } else {
            ask("HOHC"), ask("HOOC"), ask("HOOH"), ask("HOHH");
            if (!ans[3]) ans[2] = ans[3] = 'O';
          }
        } else if (ask("OO")) {
          if (!ans[2]) ans[2] = 'H';
          if (!ans[3]) ans[3] = ask((string) "OO" + ans[2] + "H") ? 'H' : 'C';
        } else {
          ask("HHH"), ans[1] = ans[2] = 'H';
          if (!*ans) *ans = 'O';
          if (!ans[3]) ans[3] = 'C';
        }
      } else {
        if (!ans[0]) {
          ask("HC");
          if (!ans[0]) ans[0] = 'O';
        } else if (!ans[2]) {
          ask(ans[1] + (string) "H");
          if (!ans[2]) ans[2] = 'O';
        }
        if (!ans[3]) {
          string s;
          s = s + ans[0] + ans[1] + ans[2];
          ask(s + (string) "C");
          ask(s + (string) "H");
          if (!ans[3]) ans[3] = 'O';
        }
      }
    } else {
      ask("HH"), ask("OH");
      for (int i = 1; i < n - 1; ++i)
        if (!ans[i]) ans[i] = 'O';
      if (!ans[n - 1]) {
        string s;
        for (int i = 1; i < n - 1; ++i) s += ans[i];
        s += 'C';
        ask(s);
        if (!ans[n - 1]) ans[n - 1] = 'O';
      }
      if (!ans[0]) {
        string s;
        for (int i = 1; i < n; ++i) s += ans[i];
        s = 'H' + s;
        ask(s);
        if (!ans[0]) ans[0] = 'O';
      }
    }
    cout << "! " << ans << endl;
    cin >> n;
    if (!n) break;
  }
  return 0;
}
