#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void ckmax(T& x, T y) {
  x = (y > x ? y : x);
}
template <typename T>
inline void ckmin(T& x, T y) {
  x = (y < x ? y : x);
}
const int MAXN = 50;
int n;
char ans[MAXN + 5];
inline void fix(int i, char c) {
  assert(ans[i] == 0 || ans[i] == c);
  ans[i] = c;
}
vector<int> ask(string s) {
  cout << "? " << s << endl;
  vector<int> res;
  int k;
  cin >> k;
  if (k == -1) exit(0);
  res.resize(k);
  for (int i = 0; i < k; ++i) {
    cin >> res[i];
    assert(res[i] + ((int)(s).size()) - 1 <= n);
    for (int j = 0; j < ((int)(s).size()); ++j) {
      fix(res[i] + j, s[j]);
    }
  }
  return res;
}
void report_ans() {
  cout << "! ";
  for (int i = 1; i <= n; ++i) cout << ans[i];
  cout << endl;
  int t;
  cin >> t;
  if (t == 0) exit(0);
}
vector<char> ch[MAXN + 5];
bool dfs(int idx, string s, bool flag) {
  if (idx == n + 1) {
    if (flag) {
      report_ans();
      return true;
    }
    if (((int)(ask(s)).size())) {
      report_ans();
      return true;
    }
    return false;
  }
  for (int i = 0; i < ((int)(ch[idx]).size()); ++i) {
    ans[idx] = ch[idx][i];
    bool t = dfs(idx + 1, s + ch[idx][i],
                 flag && (i == ((int)(ch[idx]).size()) - 1));
    if (t) return true;
  }
  return false;
}
void solve_case() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    ans[i] = 0;
    vector<char>().swap(ch[i]);
  }
  if (n > 4) {
    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] != 0) {
        ch[i].push_back(ans[i]);
      } else if (i == 1) {
        ch[i].push_back('H');
        ch[i].push_back('O');
      } else {
        ch[i].push_back('C');
        ch[i].push_back('H');
      }
    }
    dfs(1, "", 1);
  } else {
    vector<int> tmp;
    bool flag = 0;
    tmp = ask("CC");
    if (((int)(tmp).size())) flag = 1;
    tmp = ask("CH");
    if (((int)(tmp).size())) flag = 1;
    tmp = ask("CO");
    if (((int)(tmp).size())) flag = 1;
    tmp = ask("HO");
    if (((int)(tmp).size())) flag = 1;
    if (flag) {
      for (int i = 1; i <= n; ++i) {
        if (ans[i] != 0) {
          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 (((int)(tmp).size())) {
      if (ans[1] == 'O' && ans[2] == 'O' && ans[3] == 'O' && ans[4] == 'O') {
        report_ans();
        return;
      } else if (ans[1] == 'O' && ans[2] == 'O' && ans[3] == 'O') {
        ch[1].push_back('O');
        ch[2].push_back('O');
        ch[3].push_back('O');
        assert(ans[4] == 0);
        ch[4].push_back('C');
        ch[4].push_back('H');
        dfs(1, "", 1);
        return;
      } else if (ans[1] == 'O' && ans[2] == 'O') {
        ans[3] = 'H';
        ch[1].push_back('O');
        ch[2].push_back('O');
        ch[3].push_back('H');
        assert(ans[4] == 0);
        ch[4].push_back('C');
        ch[4].push_back('H');
        dfs(1, "", 1);
        return;
      }
      assert(0);
    }
    ans[2] = ans[3] = 'H';
    ask("HHH");
    if (!ans[1]) {
      ans[1] = 'O';
    }
    if (!ans[4]) {
      ans[4] = 'C';
    }
    report_ans();
    return;
  }
}
int main() {
  int T;
  cin >> T;
  while (T--) {
    solve_case();
  }
  return 0;
}
