#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  cin >> n;
  vector<char> s(n);
  int acount = 0, gcount = 0, ccount = 0, tcount = 0, askcount = 0, maximal = 0;
  for (int i = int(0); i < int(n); ++i) {
    cin >> s[i];
    if (s[i] == 'T') tcount++;
    if (s[i] == 'A') acount++;
    if (s[i] == 'G') gcount++;
    if (s[i] == 'C') ccount++;
    if (s[i] == '?') askcount++;
  }
  if (n % 4 != 0) {
    cout << "===";
    return 0;
  }
  maximal = max(max(max(tcount, acount), gcount), ccount);
  int aneed = maximal - acount, gneed = maximal - gcount,
      cneed = maximal - ccount, tneed = maximal - tcount;
  if (aneed + gneed + cneed + tneed - askcount > 0) {
    cout << "===";
    return 0;
  }
  if ((aneed + gneed + cneed + tneed - askcount) % 4 != 0) {
    cout << "===";
    return 0;
  }
  for (int i = int(0); i < int(n); ++i) {
    if (s[i] == '?') {
      if (tcount < maximal) {
        cout << 'T';
        tcount++;
      } else if (acount < maximal) {
        cout << 'A';
        acount++;
      } else if (ccount < maximal) {
        cout << 'C';
        ccount++;
      } else if (gcount < maximal) {
        cout << 'G';
        gcount++;
      } else {
        maximal++;
        cout << 'T';
        tcount++;
      }
    } else
      cout << s[i];
  }
  return 0;
}
