#include <bits/stdc++.h>
using namespace std;
struct letterCount {
  char letter;
  int count;
} letterCount;
int countChar(string s, char c) {
  int count = 0;
  for (int i = 0; i < (int)(s.size()); ++i) count += (s[i] == c);
  return count;
}
bool compByCount(const struct letterCount &A, const struct letterCount &B) {
  return (A.count < B.count);
}
string fixString(string s, vector<struct letterCount> vecLetterCount,
                 vector<int> qIndicesVec) {
  int qIndex = 0;
  for (int i = 0; i < (int)(3); ++i) {
    while (qIndex < qIndicesVec.size() &&
           vecLetterCount[i].count < vecLetterCount[3].count) {
      s[qIndicesVec[qIndex]] = vecLetterCount[i].letter;
      qIndex++;
      vecLetterCount[i].count++;
    }
  }
  int count = 0;
  while (qIndex < qIndicesVec.size()) {
    s[qIndicesVec[qIndex]] = vecLetterCount[count % 4].letter;
    count++;
    qIndex++;
  }
  int countA = countChar(s, 'A');
  int countC = countChar(s, 'C');
  int countG = countChar(s, 'G');
  int countT = countChar(s, 'T');
  if (countA == countC && countA == countG && countA == countT) {
    return s;
  }
  return "===";
}
string getAns(string s) {
  struct letterCount lc;
  vector<struct letterCount> vecLetterCount;
  int countA, countC, countG, countT;
  countA = countChar(s, 'A');
  lc.letter = 'A';
  lc.count = countA;
  vecLetterCount.push_back(lc);
  countC = countChar(s, 'C');
  lc.letter = 'C';
  lc.count = countC;
  vecLetterCount.push_back(lc);
  countG = countChar(s, 'G');
  lc.letter = 'G';
  lc.count = countG;
  vecLetterCount.push_back(lc);
  countT = countChar(s, 'T');
  lc.letter = 'T';
  lc.count = countT;
  vecLetterCount.push_back(lc);
  sort(vecLetterCount.begin(), vecLetterCount.end(), compByCount);
  vector<int> qIndicesVec;
  for (int i = 0; i < (int)(s.size()); ++i) {
    if (s[i] == '?') qIndicesVec.push_back(i);
  }
  return fixString(s, vecLetterCount, qIndicesVec);
}
int main() {
  int n;
  scanf("%d", &n);
  string s;
  cin >> s;
  cout << getAns(s) << endl;
  return 0;
}
