#include <bits/stdc++.h>
using namespace std;
vector<char> ch[100];
char ans[100];
int n;
vector<int> ask(string s) {
  vector<int> res;
  cout << "? " << s << endl;
  cout.flush();
  int k, ss = s.size();
  cin >> k;
  if (k == -1) exit(0);
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    res.push_back(x);
    for (int j = 0; j < ss; j++) ans[x + j] = s[j];
  }
  return res;
}
void report() {
  cout << "! ";
  for (int i = 1; i <= n; i++) cout << ans[i];
  cout << endl;
  cout.flush();
  int k;
  cin >> k;
  if (k == 0) exit(0);
}
bool dfs(int dep, string s, bool fl) {
  if (dep == n + 1) {
    if (fl) {
      report();
      return 1;
    }
    if (ask(s).size() > 0) {
      report();
      return 1;
    }
    return 0;
  }
  int siz = ch[dep].size();
  for (int i = 0; i < siz; i++) {
    ans[dep] = ch[dep][i];
    bool t = dfs(dep + 1, s + ch[dep][i], fl & (i == siz - 1));
    if (t) return 1;
  }
  return 0;
}
void solve4() {
  vector<int> tmp;
  bool flag = false;
  tmp = ask("CC");
  flag |= (tmp.size() > 0);
  tmp = ask("CH");
  flag |= (tmp.size() > 0);
  tmp = ask("CO");
  flag |= (tmp.size() > 0);
  tmp = ask("HO");
  flag |= (tmp.size() > 0);
  if (flag) {
    for (int i = 1; i <= n; i++)
      if (ans[i])
        ch[i].push_back(ans[i]);
      else if (i <= 3) {
        ch[i].push_back('H');
        ch[i].push_back('O');
      } else {
        ch[i].push_back('C');
        ch[i].push_back('H');
        ch[i].push_back('O');
      }
    dfs(1, "", 1);
    return;
  }
  tmp = ask("OO");
  if (tmp.size()) {
    for (int i = 1; i <= n; i++)
      if (ans[i])
        ch[i].push_back(ans[i]);
      else if (i == 3)
        ch[i].push_back('H');
      else
        ch[i].push_back('C'), ch[i].push_back('H');
    dfs(1, "", 1);
    return;
  }
  ask("HHH");
  ans[2] = ans[3] = 'H';
  if (!ans[1]) ans[1] = 'O';
  if (!ans[4]) ans[4] = 'C';
  report();
  return;
}
void solve() {
  ask("CC"), ask("CH"), ask("CO"), ask("HO"), ask("OO");
  for (int i = 2; i < n; i++)
    if (ans[i] == 0) ans[i] = 'H';
  for (int i = 1; i <= n; i++)
    if (ans[i]) ch[i].push_back(ans[i]);
  if (ch[1].empty()) ch[1].push_back('H'), ch[1].push_back('O');
  if (ch[n].empty()) ch[n].push_back('C'), ch[n].push_back('H');
  dfs(1, "", 1);
}
void work() {
  cin >> n;
  for (int i = 1; i <= n; i++) ans[i] = 0, ch[i].clear();
  if (n == 4)
    solve4();
  else
    solve();
}
signed main() {
  int tt;
  cin >> tt;
  while (tt--) work();
  return 0;
}
