#include <bits/stdc++.h>
using namespace std;
int N;
char s[3000];
map<char, int> id;
map<int, char> pd;
int i;
int num[5], x;
int main() {
  scanf("%d", &N);
  scanf("%s", s + 1);
  id['A'] = 1, id['G'] = 2, id['C'] = 3, id['T'] = 4;
  pd[1] = 'A', pd[2] = 'G', pd[3] = 'C', pd[4] = 'T';
  for (i = 1; i <= N; i++)
    if (s[i] != '?')
      num[id[s[i]]]++;
    else
      x++;
  if (x == 0) {
    int tm = num[1], f = 1;
    for (i = 2; i <= 4; i++)
      if (num[i] != tm) f = 0;
    if (!f)
      printf("===");
    else
      printf("%s", s + 1);
    return 0;
  }
  int mx = 0, ans = 0;
  for (i = 1; i <= 4; i++) mx = max(mx, num[i]);
  for (i = 1; i <= 4; i++) ans += mx - num[i];
  if (x < ans) {
    puts("===");
    return 0;
  }
  x -= ans;
  if (x % 4 != 0) {
    printf("===");
    return 0;
  }
  for (i = 1; i <= 4; i++) num[i] = mx - num[i] + x / 4;
  int now = 1;
  for (i = 1; i <= N; i++)
    if (s[i] != '?')
      printf("%c", s[i]);
    else {
      while (!num[now]) now++;
      printf("%c", pd[now]);
      num[now]--;
    }
  return 0;
}
