#include <bits/stdc++.h>
using namespace std;
long long cc(long long x1, long long y1, long long x2, long long y2) {
  return llabs(x1 - x2) + llabs(y1 - y2);
}
vector<int> ask(string s) {
  cout << "? " << s << endl;
  int len;
  cin >> len;
  vector<int> ret;
  assert(len >= 0);
  for (int i = 0; i < len; i++) {
    int x;
    cin >> x;
    x--;
    ret.push_back(x);
  }
  return ret;
}
void tass(bool x) {
  if (!x) {
    int a = 4;
    while (a > 3) {
      a++;
    }
  }
}
int main() {
  int t;
  cin >> t;
  for (int q = 1; q <= t; q++) {
    int n;
    cin >> n;
    if (n == 4) {
      char ar[n];
      for (int i = 0; i < n; i++) {
        ar[i] = '.';
      }
      vector<int> ho = ask("HO");
      vector<int> ch = ask("CH");
      vector<int> co = ask("CO");
      bool f = false;
      for (int i = 0; i < ho.size(); i++) {
        ar[ho[i]] = 'H';
        ar[ho[i] + 1] = 'O';
        f = true;
      }
      for (int i = 0; i < co.size(); i++) {
        ar[co[i]] = 'C';
        ar[co[i] + 1] = 'O';
        f = true;
      }
      for (int i = 0; i < ch.size(); i++) {
        ar[ch[i]] = 'C';
        ar[ch[i] + 1] = 'H';
        f = true;
      }
      if (f) {
        vector<int> got;
        while (true) {
          int lind = -1;
          for (int i = 0; i + 1 < n; i++) {
            if (ar[i + 1] != '.' && ar[i] == '.') {
              lind = i;
              break;
            }
          }
          if (lind != -1) {
            string m = "";
            for (int j = lind + 1; j < n && ar[j] != '.'; j++) {
              m += ar[j];
            }
            got = ask("O" + m);
            if (got.size() > 0) {
              ar[lind] = 'O';
            } else {
              got = ask("H" + m);
              if (got.size() > 0) {
                ar[lind] = 'H';
              } else {
                ar[lind] = 'C';
              }
            }
          } else {
            int rind = -1;
            for (int i = n - 1; i > 0; i--) {
              if (ar[i - 1] != '.' && ar[i] == '.') {
                rind = i;
                break;
              }
            }
            if (rind == -1) {
              break;
            }
            string m = "";
            for (int j = rind - 1; j >= 0 && ar[j] != '.'; j--) {
              m += ar[j];
            }
            reverse(m.begin(), m.end());
            got = ask(m + "O");
            if (got.size() > 0) {
              ar[rind] = 'O';
            } else {
              got = ask(m + "H");
              if (got.size() > 0) {
                ar[rind] = 'H';
              } else {
                ar[rind] = 'C';
              }
            }
          }
        }
        string ans = "";
        for (int i = 0; i < n; i++) {
          ans += ar[i];
        }
        cout << "! " << ans << endl;
        int x;
        cin >> x;
      } else {
        vector<int> got = ask("OO");
        if (got.size() == 0) {
          got = ask("CC");
          if (got.size() > 0) {
            if (got[0] == 0) {
              cout << "! CCCC" << endl;
            } else if (got[0] == 1) {
              got = ask("OCCC");
              if (got.size() > 0) {
                cout << "! OCCC" << endl;
              } else {
                cout << "! HCCC" << endl;
              }
            } else {
              got = ask("HHCC");
              if (got.size() > 0) {
                cout << "! HHCC" << endl;
              } else {
                cout << "! OHCC" << endl;
              }
            }
          } else {
            got = ask("HHH");
            if (got.size() == 0) {
              cout << "! OHHC" << endl;
            } else if (got[0] == 0) {
              if (got.size() > 1 && got[1] == 1) {
                cout << "! HHHH" << endl;
              } else {
                cout << "! HHHC" << endl;
              }
            } else {
              cout << "! OHHH" << endl;
            }
          }
        } else if (got.back() == 2) {
          cout << "! OOOO" << endl;
        } else if (got.back() == 1) {
          got = ask("OOOH");
          if (got.size() == 0) {
            cout << "! OOOC" << endl;
          } else {
            cout << "! OOOH" << endl;
          }
        } else {
          got = ask("OOH");
          if (got.size() == 0) {
            cout << "! OOCC" << endl;
          } else {
            got = ask("OOHH");
            if (got.size() > 0) {
              cout << "! OOHH" << endl;
            } else {
              cout << "! OOHC" << endl;
            }
          }
        }
        int x;
        cin >> x;
        if (x == 0) {
          return 0;
        }
      }
    } else {
      vector<int> oo = ask("OO");
      vector<int> oh = ask("OH");
      vector<int> oc = ask("OC");
      vector<int> hc = ask("HC");
      vector<int> ch = ask("CH");
      char ar[n];
      for (int i = 0; i < n; i++) {
        ar[i] = '.';
      }
      for (int i = 0; i < oh.size(); i++) {
        ar[oh[i]] = 'O';
        ar[oh[i] + 1] = 'H';
      }
      for (int i = 0; i < oo.size(); i++) {
        ar[oo[i]] = 'O';
        ar[oo[i] + 1] = 'O';
      }
      for (int i = 0; i < oc.size(); i++) {
        ar[oc[i]] = 'O';
        ar[oc[i] + 1] = 'C';
      }
      for (int i = 0; i < hc.size(); i++) {
        ar[hc[i]] = 'H';
        ar[hc[i] + 1] = 'C';
      }
      for (int i = 0; i < ch.size(); i++) {
        ar[ch[i]] = 'C';
        ar[ch[i] + 1] = 'H';
      }
      for (int i = 0; i + 2 < n; i++) {
        if (ar[i] == 'C' && ar[i + 1] == '.') {
          ar[i + 1] = 'C';
        }
        if (ar[i] == 'H' && ar[i + 1] == '.') {
          ar[i + 1] = 'H';
        }
      }
      for (int i = n - 1; i > 0; i--) {
        if (ar[i] == 'C' && ar[i - 1] == '.') {
          ar[i - 1] = 'C';
        }
        if (ar[i] == 'H' && ar[i - 1] == '.') {
          ar[i - 1] = 'H';
        }
      }
      int first = n - 1;
      for (int i = 0; i < n; i++) {
        if (ar[i] == 'O') {
          first = i;
          break;
        }
      }
      string hstr = "";
      string cstr = "";
      for (int i = 0; i < n - 1; i++) {
        if (ar[i] == '.') {
          hstr += "H";
          cstr += "C";
        } else {
          hstr += ar[i];
          cstr += ar[i];
        }
      }
      vector<int> got = ask(hstr);
      for (int i = 0; i < n - 1; i++) {
        if (ar[i] == '.') {
          ar[i] = ((got.size() > 0 && got[0] == 0) ? 'H' : 'C');
          ;
        }
      }
      if (ar[n - 1] == '.') {
        string ostring = "";
        for (int i = 0; i < n - 1; i++) {
          ostring += ar[i];
        }
        ostring += "O";
        got = ask(ostring);
        if (got.size() > 0) {
          ar[n - 1] = 'O';
        } else {
          ar[n - 1] = ar[n - 2];
        }
      }
      string ans = "";
      for (int i = 0; i < n; i++) {
        ans += ar[i];
      }
      cout << "! " << ans << endl;
      int x;
      cin >> x;
      if (x == 0) {
        return 0;
      }
    }
  }
}
