#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  int N;
  cin >> N;
  string x;
  cin >> x;
  int a = 0;
  int g = 0;
  int c = 0;
  int t = 0;
  vector<int> input;
  for (int i = 0; i < N; ++i) {
    if (x[i] == 'A') ++a;
    if (x[i] == 'G') ++g;
    if (x[i] == 'C') ++c;
    if (x[i] == 'T') ++t;
    if (x[i] == '?') input.push_back(i);
  }
  if (N % 4 != 0)
    cout << "===" << endl;
  else {
    int Mx = max(max(a, g), max(c, t));
    int req = Mx - a + Mx - g + Mx - c + Mx - t;
    if (req <= input.size()) {
      int left = input.size() - req;
      if (left % 4 == 0) {
        int cc = Mx - a + left / 4;
        while (cc--) {
          x[input[0]] = 'A';
          input.erase(input.begin());
        }
        cc = Mx - g + left / 4;
        while (cc--) {
          x[input[0]] = 'G';
          input.erase(input.begin());
        }
        cc = Mx - c + left / 4;
        while (cc--) {
          x[input[0]] = 'C';
          input.erase(input.begin());
        }
        cc = Mx - t + left / 4;
        while (cc--) {
          x[input[0]] = 'T';
          input.erase(input.begin());
        }
        cout << x << endl;
      } else
        cout << "===" << endl;
    } else
      cout << "===" << endl;
  }
}
