#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
const int MOD = 1e9 + 7;
const long long INF = 1e18 + 8;
int n;
string s;
char f() {
  int c[5];
  memset(c, 0, sizeof c);
  for (int i = 0; i < n; i++) {
    if (s[i] == 'A') c[1]++;
    if (s[i] == 'T') c[2]++;
    if (s[i] == 'C') c[3]++;
    if (s[i] == 'G') c[4]++;
  }
  int mn = 1e9, index = -1;
  for (int i = 1; i <= 4; i++)
    if (c[i] < mn) mn = c[i], index = i;
  if (index == 1) return 'A';
  if (index == 2) return 'T';
  if (index == 3) return 'C';
  if (index == 4) return 'G';
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '?') {
      char mn = f();
      if (mn == 'A')
        s[i] = 'A';
      else if (mn == 'T')
        s[i] = 'T';
      else if (mn == 'C')
        s[i] = 'C';
      else if (mn == 'G')
        s[i] = 'G';
    }
  }
  int c[5];
  memset(c, 0, sizeof c);
  for (int i = 0; i < n; i++) {
    if (s[i] == 'A') c[1]++;
    if (s[i] == 'T') c[2]++;
    if (s[i] == 'C') c[3]++;
    if (s[i] == 'G') c[4]++;
  }
  for (int i = 2; i <= 4; i++) {
    if (c[i] != c[1]) {
      cout << "===" << endl;
      return 0;
    }
  }
  cout << s << endl;
  return 0;
}
