#include <bits/stdc++.h>
using namespace std;
void print(int arr[]) {
  cout << arr[0] << " " << arr[1] << " " << arr[2] << " " << arr[3] << " "
       << arr[4] << " " << endl;
}
string nuc() {
  int n;
  string s;
  cin >> n >> s;
  if (n < 4) return "===";
  int arr[5] = {0, 0, 0, 0, 0}, m = 0;
  vector<int> v;
  char carr[4] = {'A', 'C', 'G', 'T'};
  for (int i = 0; i < n; i++) {
    if (s[i] == 'A') arr[0]++;
    if (s[i] == 'C') arr[1]++;
    if (s[i] == 'G') arr[2]++;
    if (s[i] == 'T') arr[3]++;
    if (s[i] == '?') {
      v.push_back(i);
      arr[4]++;
    }
    m = max(max(max(arr[0], arr[1]), arr[2]), arr[3]);
  }
  int faltante = (m - arr[0]) + (m - arr[1]) + (m - arr[2]) + (m - arr[3]);
  if (arr[0] == arr[1] && arr[0] == arr[2] && arr[0] == arr[3]) {
    if (arr[4] % 4 != 0 && arr[4] != 0) return "===";
  } else if (faltante > arr[4])
    return "===";
  else if ((arr[4] - faltante) % 4 != 0)
    return "===";
  arr[0] = arr[0] == m ? 0 : m - arr[0];
  arr[1] = arr[1] == m ? 0 : m - arr[1];
  arr[2] = arr[2] == m ? 0 : m - arr[2];
  arr[3] = arr[3] == m ? 0 : m - arr[3];
  int idx = 0;
  for (int i = 0; i < v.size(); i++) {
    while (arr[idx] == 0) {
      arr[idx] = -1;
      idx = (idx + 1) % 4;
    }
    if (arr[idx] > 0) {
      arr[idx]--;
    }
    s[v[i]] = carr[idx];
    if (arr[idx] == -1) {
      idx = (idx + 1) % 4;
    }
  }
  return s;
}
int main() {
  cout << nuc() << endl;
  return 0;
}
