1. #include <bits/stdc++.h>
  2. #define ll long long int
  3. #define ld long double
  4. using namespace std;
  5.  
  6. void mainSolve()
  7. {
  8. string s;
  9. int n;
  10. cin >> n >> s;
  11. for (int i = 0; i < n; i += 2)
  12. {
  13. if (s[i] == '0' && s[i + 1] == '0')
  14. cout << 'A';
  15. else if (s[i] == '0' && s[i + 1] == '1')
  16. cout << 'T';
  17. else if (s[i] == '1' && s[i + 1] == '0')
  18. cout << 'C';
  19. else
  20. cout << 'G';
  21. }
  22. cout << endl;
  23. }
  24.  
  25. int main()
  26. {
  27. #ifndef ONLINE_JUDGE
  28. freopen("input.txt", "r", stdin);
  29. freopen("output.txt", "w", stdout);
  30. #endif
  31. int t;
  32. cin >> t;
  33. while (t--)
  34. {
  35. mainSolve();
  36. }
  37. return 0;
  38. }