#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a = 0, g = 0, c = 0, t = 0, q = 0, mx;
  bool m = 0, s = 0, b = 0, e = 0;
  cin >> n;
  char w[250];
  for (int i = 0; i < n; ++i) {
    cin >> w[i];
  }
  if (n % 4 != 0) {
    cout << "===";
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    if (w[i] == '?') {
      ++q;
    }
    if (w[i] == 'A') {
      ++a;
    }
    if (w[i] == 'G') {
      ++g;
    }
    if (w[i] == 'C') {
      ++c;
    }
    if (w[i] == 'T') {
      ++t;
    }
  }
  mx = max(max(a, g), max(c, t));
  if (mx > n / 4) {
    cout << "===";
    return 0;
  } else
    mx = n / 4;
  for (int i = 0; i < n; ++i) {
    if (w[i] != '?') {
      cout << w[i];
    } else {
      if ((a < mx && q > 0) && b == 0) {
        cout << 'A';
        ++a;
        --q;
        b = 1;
        m = 0;
      } else {
        if ((g < mx && q > 0) && m == 0) {
          cout << 'G';
          ++g;
          --q;
          m = 1;
          s = 0;
        } else {
          if ((c < mx && q > 0) && s == 0) {
            cout << 'C';
            ++c;
            --q;
            s = 1;
            e = 0;
          } else {
            if ((t < mx && q > 0) && e == 0) {
              cout << 'T';
              ++t;
              --q;
              b = 0;
            }
          }
        }
      }
    }
    if (t >= mx) {
      b = 0;
    }
    if (c >= mx) {
      e = 0;
    }
    if (g >= mx) {
      s = 0;
    }
    if (a >= mx) {
      m = 0;
    }
  }
  return 0;
}
