#include <bits/stdc++.h>
using namespace std;
int firstSmall(int nums[4]) {
  int i, key, min;
  min = INT_MAX;
  for (i = 0; i < 4; i++) {
    if (nums[i] < min) {
      min = nums[i];
      key = i;
    }
  }
  return key;
}
bool compare(int nums[4]) {
  int i, num;
  num = nums[0];
  for (i = 1; i < 4; i++) {
    if (nums[i] != num) return false;
  }
  return true;
}
int main() {
  int n;
  scanf("%d", &n);
  char s[n];
  scanf("%s", s);
  int i;
  int nums[4];
  for (i = 0; i < 4; i++) nums[i] = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == 'A')
      nums[0]++;
    else if (s[i] == 'C')
      nums[1]++;
    else if (s[i] == 'G')
      nums[2]++;
    else if (s[i] == 'T')
      nums[3]++;
  }
  char vals[] = "ACGT";
  char ans[n];
  int key;
  for (i = 0; i < n; i++) {
    if (s[i] == '?') {
      key = firstSmall(nums);
      ans[i] = vals[key];
      nums[key]++;
    } else
      ans[i] = s[i];
  }
  ans[i] = '\0';
  if (compare(nums))
    printf("%s\n", ans);
  else
    printf("===\n");
  return 0;
}
