#include <bits/stdc++.h>
using namespace std;
string ans;
int query(string s) {
  int i, j, k, a;
  cout << "? " << s << endl;
  cin >> k;
  for (i = 0; i < k; i++) {
    cin >> a, a--;
    for (j = 0; j < s.size(); j++) ans[a + j] = s[j];
  }
  return k;
}
int main() {
  int i, j;
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<string> poss;
    ans = "";
    for (i = 0; i < n; i++) ans += '?';
    if (n == 4) {
      if (query("HC") + query("CO") + query("HO") == 0)
        query("CCC"), query("HHH"), query("OOO");
      for (i = 0; i < 81; i++) {
        int t = i;
        string s;
        for (j = 0; j < 4; j++) {
          if ((t % 3) == 0)
            s += 'C';
          else if ((t % 3) == 1)
            s += 'H';
          else
            s += 'O';
          t /= 3;
        }
        for (j = 0; j < 4; j++) {
          if ((ans[j] != '?') && (ans[j] != s[j])) break;
        }
        if (j == 4) {
          for (j = 0; j < 4; j++) {
            string t = s.substr(j, 2);
            if ((ans.substr(j, 2) == "??") &&
                ((t == "HC") || (t == "CO") || (t == "HO")))
              break;
            t = s.substr(j, 3);
            if ((ans.substr(j, 3) == "???") &&
                ((t == "CCC") || (t == "HHH") || (t == "OOO")))
              break;
          }
          if (j == 4) poss.push_back(s);
        }
      }
    } else {
      query("CC"), query("CH"), query("CO"), query("HO"), query("OH");
      for (i = 0; i < n - 2; i++) {
        if ((ans[i] != '?') && (ans[i] != 'C') && (ans[i + 1] == '?'))
          ans[i + 1] = ans[i];
      }
      for (i = n - 3; i >= 0; i--) {
        if ((ans[i + 1] != '?') && (ans[i + 1] != 'C') && (ans[i] == '?'))
          ans[i] = ans[i + 1];
      }
      string s = ans;
      for (i = 0; i < n - 1; i++) {
        if (s[i] == '?')
          s[i] = 'H';
        else
          break;
      }
      if (s[n - 1] == '?') s[n - 1] = s[n - 2];
      poss.push_back(s), s = ans;
      for (i = 0; i < n - 1; i++) {
        if (s[i] == '?')
          s[i] = 'H';
        else
          break;
      }
      if (s[n - 1] == '?') s[n - 1] = 'C';
      poss.push_back(s), s = ans;
      for (i = 0; i < n - 1; i++) {
        if (s[i] == '?')
          s[i] = 'O';
        else
          break;
      }
      if (s[n - 1] == '?') s[n - 1] = s[n - 2];
      poss.push_back(s), s = ans;
      for (i = 0; i < n - 1; i++) {
        if (s[i] == '?')
          s[i] = 'O';
        else
          break;
      }
      if (s[n - 1] == '?') s[n - 1] = 'C';
      poss.push_back(s);
    }
    for (i = 0; i < poss.size() - 1; i++) {
      if (query(poss[i]) > 0) break;
    }
    cout << "! " << poss[i] << endl;
    cin >> i;
  }
  return 0;
}
