#include <bits/stdc++.h>
using namespace std;
void file(string s) {
  freopen((s + ".in").c_str(), "r", stdin);
  freopen((s + ".out").c_str(), "w", stdout);
}
template <typename Tp>
void read(Tp &x) {
  int fh = 1;
  char c = getchar();
  x = 0;
  while (c > '9' || c < '0') {
    if (c == '-') {
      fh = -1;
    }
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + (c & 15);
    c = getchar();
  }
  x *= fh;
}
int n, m;
namespace Sub1 {
char a[1005], b[1005];
void solve4() {
  puts("? HHH");
  fflush(stdout);
  scanf("%d", &m);
  for (int i = 1, p; i <= m; ++i) {
    scanf("%d", &p);
    a[p] = 'H';
    a[p + 1] = 'H';
    a[p + 2] = 'H';
  }
  if (!a[1]) {
    if (!a[n]) {
      a[1] = 'O';
      a[2] = 'H';
      a[3] = 'H';
      a[4] = 'C';
    } else {
      a[1] = 'O';
    }
  } else {
    if (!a[n]) {
      a[n] = 'C';
    }
  }
}
void solve3() {
  if (!a[3]) {
    puts("? OOHH");
    fflush(stdout);
    scanf("%d", &m);
    for (int i = 1, p; i <= m; ++i) {
      scanf("%d", &p);
    }
    if (m)
      a[3] = 'H', a[4] = 'H';
    else
      a[3] = 'H', a[4] = 'C';
  } else {
    if (!a[4]) {
      puts("? OOOH");
      fflush(stdout);
      scanf("%d", &m);
      for (int i = 1, p; i <= m; ++i) {
        scanf("%d", &p);
      }
      if (m)
        a[3] = 'O', a[4] = 'H';
      else
        a[3] = 'O', a[4] = 'C';
    }
  }
}
void solve2() {
  int ps1 = -1, ps2 = -1;
  for (int i = 1; i <= n; ++i) {
    if (!a[i]) {
      if (ps1 == -1)
        ps1 = i;
      else
        ps2 = i;
    }
  }
  if (ps1 == -1) return;
  if (ps2 == -1) {
    for (int i = n; i; --i) {
      if (!a[i]) {
        ps2 = i;
        break;
      }
    }
    if (ps1 > ps2) swap(ps1, ps2);
  }
  for (int i = 1; i <= n; ++i) b[i] = a[i];
  b[ps1] = 'O';
  b[ps2] = 'C';
  printf("? ");
  puts(b + 1);
  fflush(stdout);
  scanf("%d", &m);
  if (m) {
    for (int i = 1, p; i <= m; ++i) {
      scanf("%d", &p);
    }
    for (int i = 1; i <= n; ++i) a[i] = b[i];
    return;
  }
  b[ps1] = 'O';
  b[ps2] = 'H';
  printf("? ");
  puts(b + 1);
  fflush(stdout);
  scanf("%d", &m);
  if (m) {
    for (int i = 1, p; i <= m; ++i) {
      scanf("%d", &p);
    }
    for (int i = 1; i <= n; ++i) a[i] = b[i];
    return;
  }
  b[ps1] = 'O';
  b[ps2] = 'O';
  printf("? ");
  puts(b + 1);
  fflush(stdout);
  scanf("%d", &m);
  if (m) {
    for (int i = 1, p; i <= m; ++i) {
      scanf("%d", &p);
    }
    for (int i = 1; i <= n; ++i) a[i] = b[i];
    return;
  }
  b[ps1] = 'H';
  b[ps2] = 'C';
  printf("? ");
  puts(b + 1);
  fflush(stdout);
  scanf("%d", &m);
  if (m) {
    for (int i = 1, p; i <= m; ++i) {
      scanf("%d", &p);
    }
    for (int i = 1; i <= n; ++i) a[i] = b[i];
    return;
  }
  b[ps1] = 'H';
  b[ps2] = 'H';
  printf("? ");
  puts(b + 1);
  fflush(stdout);
  scanf("%d", &m);
  if (m) {
    for (int i = 1, p; i <= m; ++i) {
      scanf("%d", &p);
    }
    for (int i = 1; i <= n; ++i) a[i] = b[i];
    return;
  }
  b[ps1] = 'H';
  b[ps2] = 'O';
  for (int i = 1; i <= n; ++i) a[i] = b[i];
}
void solve() {
  int fl = 0;
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  puts("? CC");
  fflush(stdout);
  scanf("%d", &m);
  for (int i = 1, p; i <= m; ++i) {
    scanf("%d", &p);
    fl = 1;
    a[p] = 'C';
    a[p + 1] = 'C';
  }
  puts("? CH");
  fflush(stdout);
  scanf("%d", &m);
  for (int i = 1, p; i <= m; ++i) {
    scanf("%d", &p);
    fl = 1;
    a[p] = 'C';
    a[p + 1] = 'H';
  }
  puts("? CO");
  fflush(stdout);
  scanf("%d", &m);
  for (int i = 1, p; i <= m; ++i) {
    scanf("%d", &p);
    fl = 1;
    a[p] = 'C';
    a[p + 1] = 'O';
  }
  if (fl) {
    solve2();
  } else {
    puts("? HO");
    fflush(stdout);
    scanf("%d", &m);
    for (int i = 1, p; i <= m; ++i) {
      scanf("%d", &p);
      fl = 1;
      a[p] = 'H';
      a[p + 1] = 'O';
    }
    if (fl) {
      solve2();
    } else {
      puts("? OO");
      fflush(stdout);
      scanf("%d", &m);
      for (int i = 1, p; i <= m; ++i) {
        scanf("%d", &p);
        fl = 1;
        a[p] = 'O';
        a[p + 1] = 'O';
      }
      if (fl) {
        solve3();
      } else {
        solve4();
      }
    }
  }
  printf("! ");
  puts(a + 1);
  fflush(stdout);
  scanf("%*d");
}
}  // namespace Sub1
namespace Sub2 {
char a[1005], b[1005];
void solve() {
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  puts("? CC");
  fflush(stdout);
  scanf("%d", &m);
  for (int i = 1, p; i <= m; ++i) {
    scanf("%d", &p);
    a[p] = 'C';
    a[p + 1] = 'C';
  }
  puts("? CH");
  fflush(stdout);
  scanf("%d", &m);
  for (int i = 1, p; i <= m; ++i) {
    scanf("%d", &p);
    a[p] = 'C';
    a[p + 1] = 'H';
  }
  puts("? CO");
  fflush(stdout);
  scanf("%d", &m);
  for (int i = 1, p; i <= m; ++i) {
    scanf("%d", &p);
    a[p] = 'C';
    a[p + 1] = 'O';
  }
  puts("? HO");
  fflush(stdout);
  scanf("%d", &m);
  for (int i = 1, p; i <= m; ++i) {
    scanf("%d", &p);
    a[p] = 'H';
    a[p + 1] = 'O';
  }
  puts("? OO");
  fflush(stdout);
  scanf("%d", &m);
  for (int i = 1, p; i <= m; ++i) {
    scanf("%d", &p);
    a[p] = 'O';
    a[p + 1] = 'O';
  }
  for (int i = 2; i < n; ++i) {
    if (!a[i]) a[i] = 'H';
  }
  if (!a[1] && !a[n]) {
    for (int i = 1; i <= n; ++i) b[i] = a[i];
    b[1] = 'O';
    b[n] = 'C';
    printf("? ");
    puts(b + 1);
    fflush(stdout);
    scanf("%d", &m);
    if (m) {
      for (int i = 1, p; i <= m; ++i) {
        scanf("%d", &p);
      }
      for (int i = 1; i <= n; ++i) a[i] = b[i];
    } else {
      b[1] = 'O';
      b[n] = 'H';
      printf("? ");
      puts(b + 1);
      fflush(stdout);
      scanf("%d", &m);
      if (m) {
        for (int i = 1, p; i <= m; ++i) {
          scanf("%d", &p);
        }
        for (int i = 1; i <= n; ++i) a[i] = b[i];
      } else {
        b[1] = 'H';
        b[n] = 'C';
        printf("? ");
        puts(b + 1);
        fflush(stdout);
        scanf("%d", &m);
        if (m) {
          for (int i = 1, p; i <= m; ++i) {
            scanf("%d", &p);
          }
          for (int i = 1; i <= n; ++i) a[i] = b[i];
        } else {
          a[1] = 'H';
          a[n] = 'H';
        }
      }
    }
  } else {
    if (!a[1]) {
      for (int i = 1; i <= n; ++i) b[i] = a[i];
      b[1] = 'O';
      printf("? ");
      puts(b + 1);
      fflush(stdout);
      scanf("%d", &m);
      if (m) {
        for (int i = 1, p; i <= m; ++i) {
          scanf("%d", &p);
        }
        for (int i = 1; i <= n; ++i) a[i] = b[i];
      } else {
        a[1] = 'H';
      }
    } else {
      if (!a[n]) {
        for (int i = 1; i <= n; ++i) b[i] = a[i];
        b[n] = 'C';
        printf("? ");
        puts(b + 1);
        fflush(stdout);
        scanf("%d", &m);
        if (m) {
          for (int i = 1, p; i <= m; ++i) {
            scanf("%d", &p);
          }
          for (int i = 1; i <= n; ++i) a[i] = b[i];
        } else {
          a[n] = 'H';
        }
      }
    }
  }
  printf("! ");
  puts(a + 1);
  fflush(stdout);
  scanf("%*d");
}
}  // namespace Sub2
signed main() {
  int CasT;
  scanf("%d", &CasT);
  while (CasT--) {
    scanf("%d", &n);
    if (n == 4)
      Sub1::solve();
    else
      Sub2::solve();
  }
  return 0;
}
