#include <bits/stdc++.h>
using namespace std;
int n, L, minID;
string s;
void fill(int id, char c) {
  L -= (s[id] == 'L');
  s[id] = c;
  minID = min(minID, id);
}
void query(char cmd, string str) {
  cout << cmd << " " << str << '\n';
  cout.flush();
  if (cmd == '?') {
    int k;
    cin >> k;
    assert(k != -1);
    vector<int> a(k);
    for (auto &z : a) {
      cin >> z;
      z--;
      for (int i = 0; i < str.size(); i++) {
        assert(s[z + i] == 'L' || s[z + i] == str[i]);
        fill(z + i, str[i]);
      }
    }
  } else if (cmd == '!') {
    int correct;
    cin >> correct;
    assert(correct);
  }
}
void Input() {
  cin >> n;
  s.clear();
  L = n;
  minID = n;
  s.resize(n, 'L');
}
void Solve() {
  query('?', "CH");
  query('?', "CO");
  query('?', "HC");
  query('?', "HO");
  if (L == n) {
    query('?', "CCC");
    if (minID < n) {
      for (int x = minID - 1; x >= 0; x--) fill(x, 'O');
    } else {
      query('?', "HHH");
      if (minID < n) {
        for (int x = minID - 1; x >= 0; x--) fill(x, 'O');
      } else {
        query('?', "OOO");
        if (minID == n) {
          query('?', "OOCC");
          if (minID == n) {
            fill(0, 'O');
            fill(1, 'O');
            fill(2, 'H');
            fill(3, 'H');
          }
        }
        if (s[n - 1] == 'L') {
          string t = s;
          t[n - 1] = 'C';
          if (t[n - 2] == 'L') t[n - 2] = 'C';
          query('?', t);
          if (s[n - 1] == 'L') {
            fill(n - 1, 'H');
            if (s[n - 2] == 'L') fill(n - 2, 'H');
          }
        }
      }
    }
  } else {
    int maxID = minID;
    while (maxID < n - 1 && s[maxID + 1] != 'L') maxID++;
    for (int i = minID - 1; i >= 0; i--) {
      query('?', s.substr(i + 1, 1) + s.substr(minID, maxID - minID + 1));
      if (minID != i) {
        for (int x = 0; x <= i; x++) fill(x, 'O');
        break;
      }
    }
    int nextFilled;
    for (int i = maxID + 1; i < n; i++) {
      if (s[i] != 'L') continue;
      nextFilled = i;
      while (nextFilled < n && s[nextFilled] == 'L') nextFilled++;
      query('?', s.substr(0, i) + s[i - 1]);
      if (s[i] == 'L') {
        if (s[i - 1] != 'O')
          fill(i, 'O'), assert(0);
        else {
          if (nextFilled == n) {
            query('?', s.substr(0, i) + 'C');
            if (s[i] == 'L') fill(i, 'H');
            for (int x = i + 1; x < nextFilled; x++) fill(x, s[i]);
          } else
            for (int x = i; x < nextFilled; x++) fill(x, s[nextFilled]);
          i = nextFilled - 1;
        }
      }
    }
  }
  query('!', s);
}
int main(int argc, char *argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    Input();
    Solve();
  }
  return 0;
}
