#include <bits/stdc++.h>
using namespace std;
long long int modpow(long long int a, long long int b, long long int c) {
  if (b == 0) return 1;
  if (b == 1) return a;
  long long int temp = modpow(a, b / 2, c);
  temp *= temp;
  temp %= c;
  if (b % 2 == 1) temp *= a;
  temp %= c;
  return temp;
}
int c[4] = {0};
int q[4] = {0};
char val[5] = {'A', 'C', 'G', 'T'};
int main() {
  int ca, cc, cd, ct, cq = 0, n, i, j, k, l, m;
  cin >> n;
  string a;
  cin >> a;
  for (i = 0; i < n; i++) {
    if (a[i] == 'A')
      c[0]++;
    else if (a[i] == 'C')
      c[1]++;
    else if (a[i] == 'G')
      c[2]++;
    else if (a[i] == 'T')
      c[3]++;
    else if (a[i] == '?')
      cq++;
  }
  if (cq == 0) {
    if ((c[0] == c[1]) && (c[2] == c[3]) && (c[1] == c[2]))
      cout << a << endl;
    else
      cout << "===\n";
    return 0;
  }
  if (cq > 0 && n % 4 != 0) {
    cout << "===" << endl;
    return 0;
  }
  int tot = 0;
  for (i = 0; i <= 3; i++) tot = max(tot, c[i]);
  for (i = 0; i <= 3; i++) {
    q[i] = tot - c[i];
  }
  int v = q[0] + q[1] + q[2] + q[3];
  if (cq < v || (cq - v) % 4 != 0) {
    cout << "===" << endl;
    return 0;
  }
  tot = cq - v;
  tot = tot / 4;
  for (i = 0; i <= 3; i++) q[i] += tot;
  for (i = 0; i < n; i++) {
    if (a[i] == '?') {
      for (j = 0; j <= 3; j++) {
        if (q[j] > 0) {
          cout << val[j];
          q[j]--;
          break;
        }
      }
    } else
      cout << a[i];
  }
  cout << endl;
}
