#include <bits/stdc++.h>
using namespace std;
int A, C, G, T;
string solve(string s, int a, int c, int g, int t) {
  a -= A;
  c -= C;
  g -= G;
  t -= T;
  int n = s.length();
  for (int i = 0; i < (n); ++i) {
    if (s[i] == '?') {
      if (a > 0) {
        s[i] = 'A';
        --a;
        continue;
      }
      if (c > 0) {
        s[i] = 'C';
        --c;
        continue;
      }
      if (g > 0) {
        s[i] = 'G';
        --g;
        continue;
      }
      if (t > 0) {
        s[i] = 'T';
        --t;
        continue;
      }
    }
  }
  return s;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  A = 0, C = 0, G = 0, T = 0;
  int unrec = 0;
  for (int i = 0; i < (n); ++i) {
    char c = s[i];
    switch (c) {
      case 'A':
        ++A;
        break;
      case 'C':
        ++C;
        break;
      case 'G':
        ++G;
        break;
      case 'T':
        ++T;
        break;
      default:
        ++unrec;
        break;
    }
  }
  string res = "===";
  for (int ca = 0; ca <= unrec; ++ca) {
    for (int cc = 0; cc <= unrec - ca; ++cc) {
      for (int cg = 0; cg <= unrec - ca - cc; ++cg) {
        int ct = unrec - ca - cc - cg;
        if (ct < 0) continue;
        if (ca + A + cc + C + cg + G + ct + T != n) continue;
        if (ca + A == cc + C && cc + C == cg + G && cg + G == ct + T) {
          res = solve(s, ca + A, cc + C, cg + G, ct + T);
          break;
        }
      }
    }
  }
  cout << res << endl;
  return 0;
}
