#include <bits/stdc++.h>
using namespace std;
char s[1000];
void solve(int n) {
  if (n % 4) {
    cout << "===" << endl;
    return;
  }
  int a = 0, c = 0, g = 0, t = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'A') a++;
    if (s[i] == 'C') c++;
    if (s[i] == 'G') g++;
    if (s[i] == 'T') t++;
  }
  int goal = n / 4;
  if (a > goal || c > goal || g > goal || t > goal) {
    cout << "===" << endl;
    return;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') {
      if (a < goal) {
        a++;
        s[i] = 'A';
        continue;
      }
      if (c < goal) {
        c++;
        s[i] = 'C';
        continue;
      }
      if (g < goal) {
        g++;
        s[i] = 'G';
        continue;
      }
      if (t < goal) {
        t++;
        s[i] = 'T';
        continue;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << s[i];
  }
  cout << endl;
}
int main() {
  int n;
  while (cin >> n) {
    for (int i = 0; i < n; i++) cin >> s[i];
    solve(n);
  }
  return 0;
}
