#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ar[5] = {0};
  int i, j;
  int a[4] = {0};
  if (s.size() % 4 != 0) {
    cout << "===";
    return 0;
  }
  for (i = 0; s[i]; i++) {
    if (s[i] == 'A') {
      ar[0]++;
      a[0] = 1;
    } else if (s[i] == 'C') {
      ar[1]++;
      a[1] = 1;
    } else if (s[i] == 'G') {
      ar[2]++;
      a[2] = 1;
    } else if (s[i] == 'T') {
      ar[3]++;
      a[3] = 1;
    } else
      ar[4]++;
  }
  if (ar[4] == 0) {
    if (ar[0] != ar[1] || ar[0] != ar[2] || ar[0] != ar[3] || ar[1] != ar[2] ||
        ar[1] != ar[2] || ar[2] != ar[3])
      cout << "===";
    else if (ar[0] == ar[1] == ar[2] == ar[3])
      cout << s;
    return 0;
  }
  if (ar[0] > s.size() / 4 || ar[1] > s.size() / 4 || ar[2] > s.size() / 4 ||
      ar[3] > s.size() / 4) {
    cout << "===";
    return 0;
  }
  int y = 0;
  int cnt = 0;
  for (i = 0; i < 4; i++) {
    cnt = cnt + a[i];
    if (a[i] == 1) y = i;
  }
  if (cnt == 0) {
    if (ar[4] % 4 == 0) {
      int x = ar[4] / 4;
      for (j = 0; j < x; j++) {
        cout << "A";
      }
      for (j = 0; j < x; j++) {
        cout << "C";
      }
      for (j = 0; j < x; j++) {
        cout << "G";
      }
      for (j = 0; j < x; j++) {
        cout << "T";
      }
      return 0;
    } else {
      cout << "===";
      return 0;
    }
  }
  if (cnt == 1) {
    if (ar[4] <= ar[y]) {
      cout << "===";
      return 0;
    }
  }
  int max = ar[0];
  for (i = 0; i < 4; i++) {
    if (ar[i] > max) max = ar[i];
  }
  int sum = 0;
  sum = 4 * max - ar[0] - ar[1] - ar[2] - ar[3];
  ar[0] = max - ar[0];
  ar[1] = max - ar[1];
  ar[2] = max - ar[2];
  ar[3] = max - ar[3];
  for (i = 0; ar[0] > 0 || ar[1] > 0 || ar[2] > 0 || ar[3] > 0; i++) {
    if (s[i] == '?' && ar[0] > 0) {
      s[i] = 'A';
      ar[0]--;
      ar[4]--;
    } else if (s[i] == '?' && ar[1] > 0) {
      s[i] = 'C';
      ar[1]--;
      ar[4]--;
    } else if (s[i] == '?' && ar[2] > 0) {
      s[i] = 'G';
      ar[2]--;
      ar[4]--;
    } else if (s[i] == '?' && ar[3] > 0) {
      s[i] = 'T';
      ar[3]--;
      ar[4]--;
    }
  }
  if (ar[4] % 4 == 0) {
    int x = ar[4] / 4;
    int x1, x2, x3, x4;
    x1 = x2 = x3 = x4 = x;
    while (i < s.size()) {
      if (s[i] == '?' && x1 > 0) {
        s[i] = 'A';
        x1--;
        ar[4]--;
      } else if (s[i] == '?' && x2 > 0) {
        s[i] = 'C';
        x2--;
        ar[4]--;
      } else if (s[i] == '?' && x3 > 0) {
        s[i] = 'G';
        x3--;
        ar[4]--;
      } else if (s[i] == '?' && x4 > 0) {
        s[i] = 'T';
        x4--;
        ar[4]--;
      }
      i++;
    }
    cout << s;
    return 0;
  } else {
    cout << "===";
  }
}
