#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int len, nR;
  int cI = 0, cA = 0, cG = 0, cC = 0, cT = 0;
  vector<int> vI;
  string s;
  cin >> len;
  cin >> s;
  if (len < 4) {
    cout << "===" << endl;
    return 0;
  } else if (len % 4 == 0) {
    nR = len / 4;
    for (int i = 0; i < len; i++) {
      if (s[i] == 'A') cA++;
      if (s[i] == 'G') cG++;
      if (s[i] == 'C') cC++;
      if (s[i] == 'T') cT++;
      if (s[i] == '?') {
        cI++;
        vI.push_back(i);
      }
      if (cA > nR || cG > nR || cC > nR || cT > nR) {
        cout << "===" << endl;
        return 0;
      }
    }
    int f = nR - cA;
    while (f != 0) {
      s[vI[0]] = 'A';
      vI.erase(vI.begin());
      f--;
    }
    f = nR - cG;
    while (f != 0) {
      s[vI[0]] = 'G';
      vI.erase(vI.begin());
      f--;
    }
    f = nR - cC;
    while (f != 0) {
      s[vI[0]] = 'C';
      vI.erase(vI.begin());
      f--;
    }
    f = nR - cT;
    while (f != 0) {
      s[vI[0]] = 'T';
      vI.erase(vI.begin());
      f--;
    }
    cout << s << endl;
    return 0;
  }
  cout << "===" << endl;
  return 0;
}
