/* -*- coding: utf-8 -*- * * 3374.cc: No.3374 Caesar Shift Game - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 500000; /* typedef */ /* global variables */ char s[MAX_N + 4]; /* subroutines */ /* main */ int main() { int tn; scanf("%d", &tn); while (tn--) { int n; scanf("%d%s", &n, s); for (int i = 0; i < n; i++) { if (! (i & 1)) { // A's turn if (s[i] == 'C') s[i] = 'A'; else break; } else { // B's turn if (s[i] != 'C') s[i]++; else break; } } puts(s); } return 0; }