///MD.Himon Shekh

#include<bits/stdc++.h>
using namespace std;
//#define pi 2.0*acos(0.0)
#define nl '\0'
#define sort(srt,n,grt)  sort(srt, srt+n, greater<int>());
#define sort(srt,n) sort(srt,srt+n);
#define inf 1000000000
#define mem(a, b) memset(a, b, sizeof(a))

typedef unsigned long long ull;
typedef long long ll;

//const int N = 1e7 + 7;
//bool used[N];

int main()
{
   int n;
   cin>>n;
   char st[n+1];
   cin>>st;
   ll l=strlen(st),big=0,ar[5],in=-1;
   mem(ar,0);
   char ch;
   for(int i=0;i<l;i++){
    if(st[i]=='A'){ar[0]++;if(big<=ar[0]){big=ar[0];in=0;}}
    else if(st[i]=='C'){ar[1]++;if(big<=ar[1]){big=ar[1];in=1;}}
    else if(st[i]=='G'){ar[2]++;if(big<=ar[2]){big=ar[2];in=2;}}
    else if(st[i]=='T'){ar[3]++;if(big<=ar[3]){big=ar[3];in=3;}}
    else {ar[4]++;}

    //cout<<ar[0]<<" "<<ar[1]<<" "<<ar[2]<<" "<<ar[3]<<" "<<ar[4]<<endl;
   }
   ll f,s,t,fr;
  //cout<<in<<endl;
   f=ar[in]-ar[0];
   s=ar[in]-ar[1];
   t=ar[in]-ar[2];
   fr=ar[in]-ar[3];
   //cout<<f<<" "<<s<<" "<<t<<" "<<fr<<endl;
   if(l%4){cout<<"==="<<endl;}
   else if(ar[4]-(f+s+t+fr)==0 || (ar[4]-(f+s+t+fr))%4==0 && ar[4]>4){
        ll rem=ar[4]-(f+s+t+fr);
    for(int i=0;i<l;i++){
        if(st[i]=='?'){
              if(f>0){cout<<"A";--f;}
              else if(s>0){cout<<"C";--s;}
              else if(t>0){cout<<"G";--t;}
              else if(fr>0){cout<<"T";--fr;}
              else if(rem!=0){
                    int p=1;
                for(int j=rem;j>0;j--){
                    if(p%4==1){cout<<"A";}
                    else if(p%4==2){cout<<"C";}
                    else if(p%4==3){cout<<"G";}
                    else if(p%4==0){cout<<"T";}
              ++p;
                }
                if(p>1)break;
              }
        }
        else cout<<st[i];
    }
   }
   else if(l%4==0 && l==ar[4]){
    for(int i=0;i<l;i++){
        cout<<"ACGT";
        i+=4;
    }
   }
   else {cout<<"==="<<endl;}
return 0;
}


///MD.Himon Shekh

#include<bits/stdc++.h>
using namespace std;
//#define pi 2.0*acos(0.0)
#define nl '\0'
#define sort(srt,n,grt)  sort(srt, srt+n, greater<int>());
#define sort(srt,n) sort(srt,srt+n);
#define inf 1000000000
#define mem(a, b) memset(a, b, sizeof(a))

typedef unsigned long long ull;
typedef long long ll;

//const int N = 1e7 + 7;
//bool used[N];

int main()
{
   int n;
   cin>>n;
   char st[n+1];
   cin>>st;
   ll l=strlen(st),big=0,ar[5],in=-1;
   mem(ar,0);
   char ch;
   for(int i=0;i<l;i++){
    if(st[i]=='A'){ar[0]++;if(big<=ar[0]){big=ar[0];in=0;}}
    else if(st[i]=='C'){ar[1]++;if(big<=ar[1]){big=ar[1];in=1;}}
    else if(st[i]=='G'){ar[2]++;if(big<=ar[2]){big=ar[2];in=2;}}
    else if(st[i]=='T'){ar[3]++;if(big<=ar[3]){big=ar[3];in=3;}}
    else {ar[4]++;}

    //cout<<ar[0]<<" "<<ar[1]<<" "<<ar[2]<<" "<<ar[3]<<endl;
   }
   ll f,s,t,fr;
  // cout<<in<<endl;
   f=ar[in]-ar[0];
   s=ar[in]-ar[1];
   t=ar[in]-ar[2];
   fr=ar[in]-ar[3];
   //cout<<f<<s<<t<<fr<<endl;
   if(l%4){cout<<"==="<<endl;}
   else if(ar[4]-(f+s+t+fr)==0 || (ar[4]-(f+s+t+fr))%4==0 && ar[4]>4){
        ll rem=ar[4]-(f+s+t+fr);
    for(int i=0;i<l;i++){
        if(st[i]=='?'){
              if(f>0){cout<<"A";--f;}
              else if(s>0){cout<<"C";--s;}
              else if(t>0){cout<<"G";--t;}
              else if(fr>0){cout<<"T";--fr;}
              else if(rem!=0){
                if(rem%4==0)cout<<"T",rem--;
                else if(rem%4==1)cout<<"A",rem--;
                else if(rem%4==2)cout<<"C",rem--;
                else if(rem%1==3)cout<<"G",rem--;
              }
        }
        else cout<<st[i];
    }
   }
   else if(l%4==0 && l==ar[4]){
    for(int i=0;i<l;i++){
        cout<<"ACGT";
        i+=4;
    }
   }
   else {cout<<"==="<<endl;}
return 0;
}


///MD.Himon Shekh

#include<bits/stdc++.h>
using namespace std;
//#define pi 2.0*acos(0.0)
#define nl '\0'
#define sort(srt,n,grt)  sort(srt, srt+n, greater<int>());
#define sort(srt,n) sort(srt,srt+n);
#define inf 1000000000
#define mem(a, b) memset(a, b, sizeof(a))

typedef unsigned long long ull;
typedef long long ll;

//const int N = 1e7 + 7;
//bool used[N];

int main()
{
   int n;
   cin>>n;
   char st[n+1];
   cin>>st;
   ll l=strlen(st),big=0,ar[5],in=-1,p=1,cc=0,d=0;
   mem(ar,0);
   for(int i=0;i<l;i++){
    if(st[i]=='A'){ar[0]++;if(big<=ar[0]){big=ar[0];in=0;}d++;}
    else if(st[i]=='C'){ar[1]++;if(big<=ar[1]){big=ar[1];in=1;}d++;}
    else if(st[i]=='G'){ar[2]++;if(big<=ar[2]){big=ar[2];in=2;}d++;}
    else if(st[i]=='T'){ar[3]++;if(big<=ar[3]){big=ar[3];in=3;}d++;}
    else {ar[4]++;}

    //cout<<ar[0]<<" "<<ar[1]<<" "<<ar[2]<<" "<<ar[3]<<" "<<ar[4]<<endl;
   }
   ll f,s,t,fr,c=0;
  //cout<<in<<endl;
   f=ar[in]-ar[0];
   s=ar[in]-ar[1];
   t=ar[in]-ar[2];
   fr=ar[in]-ar[3];
   //cout<<f<<" "<<s<<" "<<t<<" "<<fr<<endl;
   if(l%4){cout<<"==="<<endl;}
   else if(ar[4]-(f+s+t+fr)==0 || (ar[4]-(f+s+t+fr))%4==0 && ar[4]>4 && big!=0){
        ll rem=ar[4]-(f+s+t+fr);
    for(int i=0;i<l;i++){
        if(st[i]=='?'){
              if(f>0){cout<<"A";--f;c++;}
              else if(s>0){cout<<"C";--s;c++;}
              else if(t>0){cout<<"G";--t;c++;}
              else if(fr>0){cout<<"T";--fr;c++;}
              else if(rem>0){
                if(rem%4==1)cout<<"A";
                if(rem%4==2)cout<<"C";
                if(rem%4==3)cout<<"G";
                if(rem%4==0)cout<<"T";
                rem--;
                p++;
              }
        }
        else cout<<st[i],cc++;
    }
   }
   else if(l%4==0 && l==ar[4]){
    for(int i=1;i<=l;i++){
    int vag=l/4;
    for(int i=1;i<=vag;i++)cout<<"A";
    for(int i=1;i<=vag;i++)cout<<"C";
    for(int i=1;i<=vag;i++)cout<<"G";
    for(int i=1;i<=vag;i++)cout<<"T";
   }
   else {cout<<"==="<<endl;}
   //cout<<c<<" "<<p<<" "<<cc<<" "<<d<<endl;
return 0;
}


///MD.Himon Shekh

#include<bits/stdc++.h>
using namespace std;
//#define pi 2.0*acos(0.0)
#define nl '\0'
#define sort(srt,n,grt)  sort(srt, srt+n, greater<int>());
#define sort(srt,n) sort(srt,srt+n);
#define inf 1000000000
#define mem(a, b) memset(a, b, sizeof(a))

typedef unsigned long long ull;
typedef long long ll;

//const int N = 1e7 + 7;
//bool used[N];

int main()
{
   int n;
   cin>>n;
   char st[n+1];
   cin>>st;
   ll l=strlen(st),big=0,ar[5],in=-1;
   mem(ar,0);
   char ch;
   for(int i=0;i<l;i++){
    if(st[i]=='A'){ar[0]++;if(big<=ar[0]){big=ar[0];in=0;}}
    else if(st[i]=='C'){ar[1]++;if(big<=ar[1]){big=ar[1];in=1;}}
    else if(st[i]=='G'){ar[2]++;if(big<=ar[2]){big=ar[2];in=2;}}
    else if(st[i]=='T'){ar[3]++;if(big<=ar[3]){big=ar[3];in=3;}}
    else {ar[4]++;}

    //cout<<ar[0]<<" "<<ar[1]<<" "<<ar[2]<<" "<<ar[3]<<" "<<ar[4]<<endl;
   }
   ll f,s,t,fr;
  //cout<<in<<endl;
   f=ar[in]-ar[0];
   s=ar[in]-ar[1];
   t=ar[in]-ar[2];
   fr=ar[in]-ar[3];
   //cout<<f<<" "<<s<<" "<<t<<" "<<fr<<endl;
   if(l%4){cout<<"==="<<endl;}
   else if(ar[4]-(f+s+t+fr)==0 || (ar[4]-(f+s+t+fr))%4==0 && ar[4]>4){
    for(int i=1;i<=ar[in];i++)cout<<"A";
    for(int i=1;i<=ar[in];i++)cout<<"C";
    for(int i=1;i<=ar[in];i++)cout<<"G";
    for(int i=1;i<=ar[in];i++)cout<<"T";
    ll tot=ar[in]*4;

        l=l-tot;
        if(l%4==0 && l>0){
            while(1){
                if(l<=0)break;
                cout<<"ACGT";
                l-=4;
            }
        }

   }
   else cout<<"==="<<endl;
     /*   ll rem=ar[4]-(f+s+t+fr);
    for(int i=0;i<l;i++){
        if(st[i]=='?'){
              if(f>0){cout<<"A";--f;}
              else if(s>0){cout<<"C";--s;}
              else if(t>0){cout<<"G";--t;}
              else if(fr>0){cout<<"T";--fr;}
              else if(rem!=0){
                    int p=1;
                for(int j=rem;j>0;j--){
                    if(p%4==1){cout<<"A";}
                    else if(p%4==2){cout<<"C";}
                    else if(p%4==3){cout<<"G";}
                    else if(p%4==0){cout<<"T";}
              ++p;
                }
                if(p>1)break;
              }
        }
        else cout<<st[i];
    }
   }
   else if(l%4==0 && l==ar[4]){
    for(int i=0;i<l;i++){
        cout<<"ACGT";
        i+=4;
    }
   }*/
return 0;
}


///MD.Himon Shekh

#include<bits/stdc++.h>
using namespace std;
//#define pi 2.0*acos(0.0)
#define nl '\0'
#define sort(srt,n,grt)  sort(srt, srt+n, greater<int>());
#define sort(srt,n) sort(srt,srt+n);
#define inf 1000000000
#define mem(a, b) memset(a, b, sizeof(a))

typedef unsigned long long ull;
typedef long long ll;

//const int N = 1e7 + 7;
//bool used[N];

int main()
{
   int n;
   cin>>n;
   char st[n+1];
   cin>>st;
   ll l=strlen(st),big=0,ar[5],in=-1,p=1,cc=0,d=0;
   mem(ar,0);
   for(int i=0;i<l;i++){
    if(st[i]=='A'){ar[0]++;if(big<=ar[0]){big=ar[0];in=0;}d++;}
    else if(st[i]=='C'){ar[1]++;if(big<=ar[1]){big=ar[1];in=1;}d++;}
    else if(st[i]=='G'){ar[2]++;if(big<=ar[2]){big=ar[2];in=2;}d++;}
    else if(st[i]=='T'){ar[3]++;if(big<=ar[3]){big=ar[3];in=3;}d++;}
    else {ar[4]++;}

    //cout<<ar[0]<<" "<<ar[1]<<" "<<ar[2]<<" "<<ar[3]<<" "<<ar[4]<<endl;
   }
   ll f,s,t,fr,c=0;
  //cout<<in<<endl;
   f=ar[in]-ar[0];
   s=ar[in]-ar[1];
   t=ar[in]-ar[2];
   fr=ar[in]-ar[3];
   //cout<<f<<" "<<s<<" "<<t<<" "<<fr<<endl;
   if(l%4){cout<<"==="<<endl;}
   else if(ar[4]-(f+s+t+fr)==0 || (ar[4]-(f+s+t+fr))%4==0 && ar[4]>4 && big!=0){
        ll rem=ar[4]-(f+s+t+fr);
    for(int i=0;i<l;i++){
        if(st[i]=='?'){
              if(f>0){cout<<"A";--f;c++;}
              else if(s>0){cout<<"C";--s;c++;}
              else if(t>0){cout<<"G";--t;c++;}
              else if(fr>0){cout<<"T";--fr;c++;}
              else if(rem>0){
                if(rem%4==1)cout<<"A";
                if(rem%4==2)cout<<"C";
                if(rem%4==3)cout<<"G";
                if(rem%4==0)cout<<"T";
                rem--;
                p++;
              }
        }
        else cout<<st[i],cc++;
    }
   }
   else if(l%4==0 && l==ar[4]){
    for(int i=0;i<l;i++){
        cout<<"ACGT";
        i+=4;
    }
   }
   else {cout<<"==="<<endl;}
   //cout<<c<<" "<<p<<" "<<cc<<" "<<d<<endl;
return 0;
}


///MD.Himon Shekh

#include<bits/stdc++.h>
using namespace std;
//#define pi 2.0*acos(0.0)
#define nl '\0'
#define sort(srt,n,grt)  sort(srt, srt+n, greater<int>());
#define sort(srt,n) sort(srt,srt+n);
#define inf 1000000000
#define mem(a, b) memset(a, b, sizeof(a))

typedef unsigned long long ull;
typedef long long ll;

//const int N = 1e7 + 7;
//bool used[N];

int main()
{
   int n;
   cin>>n;
   char st[n+1];
   cin>>st;
   ll l=strlen(st),big=0,ar[5],in=-1,p=1,cc=0,d=0;
   mem(ar,0);
   for(int i=0;i<l;i++){
    if(st[i]=='A'){ar[0]++;if(big<=ar[0]){big=ar[0];in=0;}d++;}
    else if(st[i]=='C'){ar[1]++;if(big<=ar[1]){big=ar[1];in=1;}d++;}
    else if(st[i]=='G'){ar[2]++;if(big<=ar[2]){big=ar[2];in=2;}d++;}
    else if(st[i]=='T'){ar[3]++;if(big<=ar[3]){big=ar[3];in=3;}d++;}
    else {ar[4]++;}

    //cout<<ar[0]<<" "<<ar[1]<<" "<<ar[2]<<" "<<ar[3]<<" "<<ar[4]<<endl;
   }
   ll f,s,t,fr,c=0;
  //cout<<in<<endl;
   f=ar[in]-ar[0];
   s=ar[in]-ar[1];
   t=ar[in]-ar[2];
   fr=ar[in]-ar[3];
   //cout<<f<<" "<<s<<" "<<t<<" "<<fr<<endl;
   if(l%4){cout<<"==="<<endl;}
   else if(ar[4]-(f+s+t+fr)==0 || (ar[4]-(f+s+t+fr))%4==0 && ar[4]>4 && big!=0){
        ll rem=ar[4]-(f+s+t+fr);
    for(int i=0;i<l;i++){
        if(st[i]=='?'){
              if(f>0){cout<<"A";--f;c++;}
              else if(s>0){cout<<"C";--s;c++;}
              else if(t>0){cout<<"G";--t;c++;}
              else if(fr>0){cout<<"T";--fr;c++;}
              else if(rem>0){
                if(rem%4==1)cout<<"A";
                if(rem%4==2)cout<<"C";
                if(rem%4==3)cout<<"G";
                if(rem%4==0)cout<<"T";
                rem--;
                p++;
              }
        }
        else cout<<st[i],cc++;
    }
   }
   else if(l%4==0 && l==ar[4]){
    int vag=l/4;
    for(int k=1;k<=vag;k++)cout<<"A";
    for(int k=1;k<=vag;k++)cout<<"C";
    for(int k=1;k<=vag;k++)cout<<"G";
    for(int k=1;k<=vag;k++)cout<<"T";
   }
   else {cout<<"==="<<endl;}
   //cout<<c<<" "<<p<<" "<<cc<<" "<<d<<endl;
return 0;
}


#include <algorithm>
#include <bitset>
#include <deque>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
#include <iostream>
using namespace std;
#define forall(i,a,b)               for(int i=a;i<=b;i++)
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
#define each(it,o) for(auto it= (o).begin(); it != (o).end(); ++ it)
#define all(o) (o).begin(), (o).end()
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset(m,v,sizeof(m))
typedef long long lli;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef map<char,int> mci;
typedef map<int,int> mii;
typedef priority_queue<int>	pqi;
typedef priority_queue<int,vector<int>,greater<int>> pqil;
typedef set<int> si;
typedef set<char> sc;
const long MOD = 1000000007;
int main()
{
	int t1;
	cin>>t1;
	string s;
	cin>>s;
	int aa=0,c=0,g=0,t=0,q=0;
	forall(i,0,s.size()-1)
	{
		if(s[i]=='A')aa++;
		if(s[i]=='C')c++;
		if(s[i]=='G')g++;
		if(s[i]=='T')t++;
		if(s[i]=='?')q++;
	}
	int a[4];
	a[0]=c;
	a[1]=g;
	a[2]=t;
	a[3]=aa;
	sort(a,a+4);
	char c1,c2,c3,c4;
	if(a[0]==c)c1='C';
	if(a[0]==g)c1='G';
	if(a[0]==t)c1='T';
	if(a[0]==aa)c1='A';
	if(a[1]==c&&c1!='C')c2='C';
	if(a[1]==g&&c1!='G')c2='G';
	if(a[1]==aa&&c1!='A')c2='A';
	if(a[1]==t&&c1!='T')c2='T';
	if(a[2]==c&&c1!='C'&&c2!='C')c3='C';
	if(a[2]==g&&c1!='G'&&c2!='G')c3='G';
	if(a[2]==t&&c1!='T'&&c2!='T')c3='T';
	if(a[2]==aa&&c1!='A'&&c2!='A')c3='A';
	if(q==a[3]-a[2]+a[3]-a[1]+a[3]-a[1])
	{
		forall(i,0,s.size()-1)
		{
			if(s[i]=='?')
			{
				if(a[0]>0)
				{
					cout<<c1;
					a[0]--;
				}
				else if(a[1]>0)
				{
					cout<<c2;
					a[1]--;
				}
				else
				{
					cout<<c3;
					a[2]--;
				}
			}
			else
			cout<<s[i];
		}
	}
	else
	{
		cout<<"==="<<endl;
	}
}


#include <algorithm>
#include <bitset>
#include <deque>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
#include <iostream>
using namespace std;
#define forall(i,a,b)               for(int i=a;i<=b;i++)
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
#define each(it,o) for(auto it= (o).begin(); it != (o).end(); ++ it)
#define all(o) (o).begin(), (o).end()
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset(m,v,sizeof(m))
typedef long long lli;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef map<char,int> mci;
typedef map<int,int> mii;
typedef priority_queue<int>	pqi;
typedef priority_queue<int,vector<int>,greater<int>> pqil;
typedef set<int> si;
typedef set<char> sc;
const long MOD = 1000000007;
int main()
{
	int t1;
	cin>>t1;
	string s;
	cin>>s;
	int aa=0,c=0,g=0,t=0,q=0;
	forall(i,0,s.size()-1)
	{
		if(s[i]=='A')aa++;
		if(s[i]=='C')c++;
		if(s[i]=='G')g++;
		if(s[i]=='T')t++;
		if(s[i]=='?')q++;
	}
	int a[4];
	a[0]=c;
	a[1]=g;
	a[2]=t;
	a[3]=aa;
	sort(a,a+4);
	char c1,c2,c3,c4;
	if(a[0]==c)c1='C';
	if(a[0]==g)c1='G';
	if(a[0]==t)c1='T';
	if(a[0]==aa)c1='A';
	if(a[1]==c&&c1!='C')c2='C';
	if(a[1]==g&&c1!='G')c2='G';
	if(a[1]==aa&&c1!='A')c2='A';
	if(a[1]==t&&c1!='T')c2='T';
	if(a[2]==c&&c1!='C'&&c2!='C')c3='C';
	if(a[2]==g&&c1!='G'&&c2!='G')c3='G';
	if(a[2]==t&&c1!='T'&&c2!='T')c3='T';
	if(a[2]==aa&&c1!='A'&&c2!='A')c3='A';
	if((q-(a[3]-a[2]+a[3]-a[1]+a[3]-a[0]))%4==0&&q>=(a[3]-a[2]+a[3]-a[1]+a[3]-a[0]))
	{
		forall(i,0,s.size()-1)
		{
			if(s[i]=='?')
			{
				if(a[0]>0)
				{
					s[i]=c1;
					a[0]--;
				}
				else if(a[1]>0)
				{
					s[i]=c2;
					a[1]--;
				}
				else
				{
					if(a[2]>0)
					{
					s[i]=c3;
					a[2]--;}
				}
				q--;
			}
			else
			cout<<s[i];
		}
	}
	if(q%4==0)
	{
		char prev='A';
		forall(i,0,s.size()-1)
		{
			if(s[i]=='?')
			{
				bool isis=1;
				s[i]=prev;
				if(prev=='A')
				{
					prev='G';
					isis=0;
				}
				if(prev=='G'&&isis==1)
				{
					prev='C';
					isis=0;
				}
				if(prev=='C'&&isis==1)
				{
					prev='T';
					isis=0;
				}
				if(prev=='T'&&isis==1)
				{
					prev='A';
					isis=0;
				}
				continue;
			}
		}
		cout<<s<<endl;
	}
	else
	{
		cout<<"==="<<endl;
	}
}


#include <algorithm>
#include <bitset>
#include <deque>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
#include <iostream>
using namespace std;
#define forall(i,a,b)               for(int i=a;i<=b;i++)
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
#define each(it,o) for(auto it= (o).begin(); it != (o).end(); ++ it)
#define all(o) (o).begin(), (o).end()
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset(m,v,sizeof(m))
typedef long long lli;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef map<char,int> mci;
typedef map<int,int> mii;
typedef priority_queue<int>	pqi;
typedef priority_queue<int,vector<int>,greater<int>> pqil;
typedef set<int> si;
typedef set<char> sc;
const long MOD = 1000000007;
int main()
{
	int t1;
	cin>>t1;
	string s;
	cin>>s;
	int aa=0,c=0,g=0,t=0,q=0;
	forall(i,0,s.size()-1)
	{
		if(s[i]=='A')aa++;
		if(s[i]=='C')c++;
		if(s[i]=='G')g++;
		if(s[i]=='T')t++;
		if(s[i]=='?')q++;
	}
	int a[4];
	a[0]=c;
	a[1]=g;
	a[2]=t;
	a[3]=aa;
	sort(a,a+4);
	char c1,c2,c3,c4;
	if(a[0]==c)c1='C';
	if(a[0]==g)c1='G';
	if(a[0]==t)c1='T';
	if(a[0]==aa)c1='A';
	if(a[1]==c&&c1!='C')c2='C';
	if(a[1]==g&&c1!='G')c2='G';
	if(a[1]==aa&&c1!='A')c2='A';
	if(a[1]==t&&c1!='T')c2='T';
	if(a[2]==c&&c1!='C'&&c2!='C')c3='C';
	if(a[2]==g&&c1!='G'&&c2!='G')c3='G';
	if(a[2]==t&&c1!='T'&&c2!='T')c3='T';
	if(a[2]==aa&&c1!='A'&&c2!='A')c3='A';
	if((q-(a[3]-a[2]+a[3]-a[1]+a[3]-a[0]))%4==0&&q>=(a[3]-a[2]+a[3]-a[1]+a[3]-a[0]))
	{
		forall(i,0,s.size()-1)
		{
			if(s[i]=='?')
			{
				if(a[0]>0)
				{
					s[i]=c1;
					a[0]--;
				}
				else if(a[1]>0)
				{
					s[i]=c2;
					a[1]--;
				}
				else
				{
					if(a[2]>0)
					{
					s[i]=c3;
					a[2]--;}
				}
				q--;
			}
		}
		char prev='A';
		forall(i,0,s.size()-1)
		{
			if(s[i]=='?')
			{
				bool isis=1;
				s[i]=prev;
				if(prev=='A')
				{
					prev='G';
					isis=0;
				}
				if(prev=='G'&&isis==1)
				{
					prev='C';
					isis=0;
				}
				if(prev=='C'&&isis==1)
				{
					prev='T';
					isis=0;
				}
				if(prev=='T'&&isis==1)
				{
					prev='A';
					isis=0;
				}
				continue;
			}
		}
		cout<<s<<endl;
	}

	else
	{
		cout<<"==="<<endl;
	}
}


#include <algorithm>
#include <bitset>
#include <deque>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
#include <iostream>
using namespace std;
#define forall(i,a,b)               for(int i=a;i<=b;i++)
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
#define each(it,o) for(auto it= (o).begin(); it != (o).end(); ++ it)
#define all(o) (o).begin(), (o).end()
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset(m,v,sizeof(m))
typedef long long lli;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef map<char,int> mci;
typedef map<int,int> mii;
typedef priority_queue<int>	pqi;
typedef priority_queue<int,vector<int>,greater<int>> pqil;
typedef set<int> si;
typedef set<char> sc;
const long MOD = 1000000007;
int main()
{
	int t1;
	cin>>t1;
	string s;
	cin>>s;
	int aa=0,c=0,g=0,t=0,q=0;
	forall(i,0,s.size()-1)
	{
		if(s[i]=='A')aa++;
		if(s[i]=='C')c++;
		if(s[i]=='G')g++;
		if(s[i]=='T')t++;
		if(s[i]=='?')q++;
	}
	int a[4];
	a[0]=c;
	a[1]=g;
	a[2]=t;
	a[3]=aa;
	sort(a,a+4);
	char c1,c2,c3,c4;
	if(a[0]==c)c1='C';
	if(a[0]==g)c1='G';
	if(a[0]==t)c1='T';
	if(a[0]==aa)c1='A';
	if(a[1]==c&&c1!='C')c2='C';
	if(a[1]==g&&c1!='G')c2='G';
	if(a[1]==aa&&c1!='A')c2='A';
	if(a[1]==t&&c1!='T')c2='T';
	if(a[2]==c&&c1!='C'&&c2!='C')c3='C';
	if(a[2]==g&&c1!='G'&&c2!='G')c3='G';
	if(a[2]==t&&c1!='T'&&c2!='T')c3='T';
	if(a[2]==aa&&c1!='A'&&c2!='A')c3='A';
	if((q-(a[3]-a[2]+a[3]-a[1]+a[3]-a[0]))%4==0&&q>=(a[3]-a[2]+a[3]-a[1]+a[3]-a[0]))
	{
		forall(i,0,s.size()-1)
		{
			if(s[i]=='?')
			{
				if(a[0]>0)
				{
					s[i]=c1;
					a[0]--;
				}
				else if(a[1]>0)
				{
					s[i]=c2;
					a[1]--;
				}
				else
				{
					if(a[2]>0)
					{
					s[i]=c3;
					a[2]--;}
				}
				q--;
			}
		}
	}
	if(q%4==0)
	{
		char prev='A';
		forall(i,0,s.size()-1)
		{
			if(s[i]=='?')
			{
				bool isis=1;
				s[i]=prev;
				if(prev=='A')
				{
					prev='G';
					isis=0;
				}
				if(prev=='G'&&isis==1)
				{
					prev='C';
					isis=0;
				}
				if(prev=='C'&&isis==1)
				{
					prev='T';
					isis=0;
				}
				if(prev=='T'&&isis==1)
				{
					prev='A';
					isis=0;
				}
				continue;
			}
		}
		cout<<s<<endl;
	}
	else
	{
		cout<<"==="<<endl;
	}
}


#include <algorithm>
#include <bitset>
#include <deque>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
#include <iostream>
using namespace std;
#define forall(i,a,b)               for(int i=a;i<=b;i++)
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
#define each(it,o) for(auto it= (o).begin(); it != (o).end(); ++ it)
#define all(o) (o).begin(), (o).end()
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset(m,v,sizeof(m))
typedef long long lli;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef map<char,int> mci;
typedef map<int,int> mii;
typedef priority_queue<int>	pqi;
typedef priority_queue<int,vector<int>,greater<int>> pqil;
typedef set<int> si;
typedef set<char> sc;
const long MOD = 1000000007;
int main()
{
	int t1;
	cin>>t1;
	string s;
	cin>>s;
	int aa=0,c=0,g=0,t=0,q=0;
	vector<pair<int,char>>xx;
	forall(i,0,s.size()-1)
	{
		if(s[i]=='A')aa++;
		if(s[i]=='C')c++;
		if(s[i]=='G')g++;
		if(s[i]=='T')t++;
		if(s[i]=='?')q++;
	}
	xx.push_back(mp(aa,'A'));
	xx.push_back(mp(c,'C'));
	xx.push_back(mp(g,'G'));
	xx.push_back(mp(t,'T'));
	sort(xx.begin(),xx.end());
	char c1=xx[0].second,c2=xx[1].second,c3=xx[2].second;
	int a[4];
	a[0]=xx[0].first;
	a[1]=xx[1].first;
	a[2]=xx[2].first;
	a[3]=xx[3].first;
	if((q-(a[3]-a[2]+a[3]-a[1]+a[3]-a[0]))%4==0&&q>=(a[3]-a[2]+a[3]-a[1]+a[3]-a[0]))
	{
		forall(i,0,s.size()-1)
		{
			if(s[i]=='?')
			{
				if(a[0]>0)
				{
					s[i]=c1;
					a[0]--;
				}
				else if(a[1]>0)
				{
					s[i]=c2;
					a[1]--;
				}
				else
				{
					if(a[2]>0)
					{
					s[i]=c3;
					a[2]--;}
				}
				q--;
			}
		}
		char prev='A';
		forall(i,0,s.size()-1)
		{
			if(s[i]=='?')
			{
				bool isis=1;
				s[i]=prev;
				if(prev=='A')
				{
					prev='G';
					isis=0;
				}
				if(prev=='G'&&isis==1)
				{
					prev='C';
					isis=0;
				}
				if(prev=='C'&&isis==1)
				{
					prev='T';
					isis=0;
				}
				if(prev=='T'&&isis==1)
				{
					prev='A';
					isis=0;
				}
				continue;
			}
		}
		cout<<s<<endl;
	}
	else
	{
		cout<<"==="<<endl;
	}
}


#include <algorithm>
#include <bitset>
#include <deque>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
#include <iostream>
using namespace std;
#define forall(i,a,b)               for(int i=a;i<=b;i++)
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
#define each(it,o) for(auto it= (o).begin(); it != (o).end(); ++ it)
#define all(o) (o).begin(), (o).end()
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset(m,v,sizeof(m))
typedef long long lli;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef map<char,int> mci;
typedef map<int,int> mii;
typedef priority_queue<int>	pqi;
typedef priority_queue<int,vector<int>,greater<int>> pqil;
typedef set<int> si;
typedef set<char> sc;
const long MOD = 1000000007;
int main()
{
	int t1;
	cin>>t1;
	string s;
	cin>>s;
	int aa=0,c=0,g=0,t=0,q=0;
	vector<pair<int,char>>xx;
	forall(i,0,s.size()-1)
	{
		if(s[i]=='A')aa++;
		if(s[i]=='C')c++;
		if(s[i]=='G')g++;
		if(s[i]=='T')t++;
		if(s[i]=='?')q++;
	}
	xx.push_back(mp(aa,'A'));
	xx.push_back(mp(c,'C'));
	xx.push_back(mp(g,'G'));
	xx.push_back(mp(t,'T'));
	sort(xx.begin(),xx.end());
	char c1=xx[0].second,c2=xx[1].second,c3=xx[2].second;
	int a[4];
	a[0]=xx[3].first-xx[0].first;
	a[1]=xx[3].first-xx[1].first;
	a[2]=xx[3].first-xx[2].first;
	a[3]=xx[3].first-xx[3].first;
	if((q-(a[2]+a[1]+a[0]))%4==0&&q>=(a[2]+a[1]+a[0]))
	{
		forall(i,0,s.size()-1)
		{
			if(s[i]=='?')
			{
				if(a[0]>0)
				{
					s[i]=c1;
					a[0]--;
				}
				else if(a[1]>0)
				{
					s[i]=c2;
					a[1]--;
				}
				else
				{
					if(a[2]>0)
					{
					s[i]=c3;
					a[2]--;}
				}
				q--;
			}
		}
		char prev='A';
		forall(i,0,s.size()-1)
		{
			if(s[i]=='?')
			{
				bool isis=1;
				s[i]=prev;
				if(prev=='A')
				{
					prev='G';
					isis=0;
				}
				if(prev=='G'&&isis==1)
				{
					prev='C';
					isis=0;
				}
				if(prev=='C'&&isis==1)
				{
					prev='T';
					isis=0;
				}
				if(prev=='T'&&isis==1)
				{
					prev='A';
					isis=0;
				}
				continue;
			}
		}
		cout<<s<<endl;
	}
	else
	{
		cout<<"==="<<endl;
	}
}


#include<stdio.h>
#include<stdlib.h>
#include<bits/stdc++.h>
using namespace std;

map<char,int> ma;
int main(){
   int n,i,max=0,coun=0;
   char p[4]={'A','C','G','T'};int z=0;
   cin>>n;
   string s;
   cin>>s;
   char ch;
   ma['A']=0;
   ma['C']=0;
   ma['G']=0;
   ma['T']=0;
   ma['?']=0;
   for(i=0;i<n;i++){
      ch=s[i];
      ma[ch]++;
   }
   ch='A';
   map<char,int>::iterator it=ma.begin();
   for(map<char,int>::iterator it=ma.begin();it!= ma.end();++it){
      if((*it).first!='?'&&(*it).second>max){
        max=(*it).second;
        ch=(*it).first;
      }
   }
   int sum=4*ma[ch]-ma['A']-ma['C']-ma['G']-ma['T'];
   if((ma['?']-sum)%4!=0||ma['?']<sum){
       cout<<"===";
   }
   int g=ma['?'];
   ma['A']=max-ma['A'];
   ma['C']=max-ma['C'];
   ma['G']=max-ma['G'];
   ma['T']=max-ma['T'];
   if((ma['?']-sum)%4==0&&ma['?']>=sum) {
      ma['?']=0;
      map<char,int>::iterator it1=ma.begin();
      for(i=0;i<n;i++){
         if(s[i]!='?'){
            cout<<s[i];
         }
         if((coun<=sum&&s[i]=='?')&&it!=ma.end()){
            while((*it1).second==0&&it1!=ma.end()){
                ++it1;
            }
            if((*it1).second!=0&&it1!=ma.end()){
            cout<<(*it1).first;
            coun++;
            ma[(*it1).first]--;}
            if((*it1).second==0&&it1!=ma.end()){
                ++it1;
            }

         }
         if(((coun>sum||(g==n))||(coun==0&&sum==0))&&s[i]=='?'){
              cout<<p[z%4];
              z++;
           }
      }
   }
   return 0;

 }


#include<stdio.h>
#include<stdlib.h>
#include<bits/stdc++.h>
using namespace std;

map<char,int> ma;
int main(){
   int n,i,max=0,coun=0;
   char p[4]={'A','C','G','T'};int z=0;
   cin>>n;
   string s;
   cin>>s;
   char ch;
   ma['A']=0;
   ma['C']=0;
   ma['G']=0;
   ma['T']=0;
   ma['?']=0;
   for(i=0;i<n;i++){
      ch=s[i];
      ma[ch]++;
   }
   map<char,int>::iterator it=ma.begin();
   for(map<char,int>::iterator it=ma.begin();it!= ma.end();++it){
      if((*it).first!='?'&&(*it).second>max){
        max=(*it).second;
        ch=(*it).first;
      }
   }
   int sum=4*ma[ch]-ma['A']-ma['C']-ma['G']-ma['T'];
   if((ma['?']-sum)%4!=0||ma['?']<sum){
       cout<<"===";
   }
   ma['A']=max-ma['A'];
   ma['C']=max-ma['C'];
   ma['G']=max-ma['G'];
   ma['T']=max-ma['T'];
   if((ma['?']-sum)%4==0&&ma['?']>=sum) {
      ma['?']=0;
      map<char,int>::iterator it1=ma.begin();
      for(i=0;i<n;i++){
         if(s[i]!='?'){
            cout<<s[i];
         }
         if(coun<=sum&&s[i]=='?'){
            while((*it1).second==0){
                ++it1;
            }
            if((*it1).second!=0){
            cout<<(*it1).first;
            coun++;
            ma[(*it1).first]--;}
            if((*it1).second==0){
                ++it1;
            }
            if(coun>sum){
              cout<<p[z%4];
              z++;
           }

         }
      }
   }
   return 0;

 }


#include<stdio.h>
#include<stdlib.h>
#include<bits/stdc++.h>
using namespace std;

map<char,int> ma;
int main(){
   int n,i,max=0,coun=0;
   char p[4]={'A','C','G','T'};int z=0;
   cin>>n;
   string s;
   cin>>s;
   char ch;
   ma['A']=0;
   ma['C']=0;
   ma['G']=0;
   ma['T']=0;
   ma['?']=0;
   for(i=0;i<n;i++){
      ch=s[i];
      ma[ch]++;
   }
   ch='A';
   map<char,int>::iterator it=ma.begin();
   for(map<char,int>::iterator it=ma.begin();it!= ma.end();++it){
      if((*it).first!='?'&&(*it).second>max){
        max=(*it).second;
        ch=(*it).first;
      }
   }
   int sum=4*ma[ch]-ma['A']-ma['C']-ma['G']-ma['T'];
   if((ma['?']-sum)%4!=0||ma['?']<sum){
       cout<<"===";
   }
   int g=ma['?'];
   ma['A']=max-ma['A'];
   ma['C']=max-ma['C'];
   ma['G']=max-ma['G'];
   ma['T']=max-ma['T'];
   if((ma['?']-sum)%4==0&&ma['?']>=sum) {
      ma['?']=0;
      map<char,int>::iterator it1=ma.begin();
      for(i=0;i<n;i++){
         if(s[i]!='?'){
            cout<<s[i];
         }
         if(coun<=sum&&s[i]=='?'){
            while((*it1).second==0&&it1!=ma.end()){
                ++it1;
            }
            if((*it1).second!=0&&it1!=ma.end()){
            cout<<(*it1).first;
            coun++;
            ma[(*it1).first]--;}
            if((*it1).second==0&&it1!=ma.end()){
                ++it1;
            }

         }
         if((coun>sum||(g==n))&&s[i]=='?'){
              cout<<p[z%4];
              z++;
           }
      }
   }
   return 0;

 }


#include<stdio.h>
#include<stdlib.h>
#include<bits/stdc++.h>
using namespace std;

map<char,int> ma;
int main(){
   int n,i,max=0,coun=0;
   char p[4]={'A','C','G','T'};int z=0;
   cin>>n;
   string s;
   cin>>s;
   char ch;
   ma['A']=0;
   ma['C']=0;
   ma['G']=0;
   ma['T']=0;
   ma['?']=0;
   for(i=0;i<n;i++){
      ch=s[i];
      ma[ch]++;
   }
   ch='A';
   map<char,int>::iterator it=ma.begin();
   for(map<char,int>::iterator it=ma.begin();it!= ma.end();++it){
      if((*it).first!='?'&&(*it).second>max){
        max=(*it).second;
        ch=(*it).first;
      }
   }
   int sum=4*ma[ch]-ma['A']-ma['C']-ma['G']-ma['T'];
   if((ma['?']-sum)%4!=0||ma['?']<sum){
       cout<<"===";
   }
   int g=ma['?'];
   ma['A']=max-ma['A'];
   ma['C']=max-ma['C'];
   ma['G']=max-ma['G'];
   ma['T']=max-ma['T'];
   if((ma['?']-sum)%4==0&&ma['?']>=sum) {
      ma['?']=0;
      map<char,int>::iterator it1=ma.begin();
      for(i=0;i<n;i++){
         if(s[i]!='?'){
            cout<<s[i];
         }
         if((coun<=sum&&s[i]=='?')&&it!=ma.end()){
            while((*it1).second==0&&it1!=ma.end()){
                ++it1;
            }
            if((*it1).second!=0&&it1!=ma.end()){
            cout<<(*it1).first;
            coun++;
            ma[(*it1).first]--;}
            if((*it1).second==0&&it1!=ma.end()){
                ++it1;
            }

         }
         if(((coun>sum||(g==n))||(coun==0||sum==0))&&s[i]=='?'){
              cout<<p[z%4];
              z++;
           }
      }
   }
   return 0;

 }


#include<stdio.h>
#include<stdlib.h>
#include<bits/stdc++.h>
using namespace std;

map<char,int> ma;
int main(){
   int n,i,max=0,coun=0;
   char p[4]={'A','C','G','T'};int z=0;
   cin>>n;
   string s;
   cin>>s;
   char ch;
   ma['A']=0;
   ma['C']=0;
   ma['G']=0;
   ma['T']=0;
   ma['?']=0;
   for(i=0;i<n;i++){
      ch=s[i];
      ma[ch]++;
   }
   ch='A';
   map<char,int>::iterator it=ma.begin();
   for(map<char,int>::iterator it=ma.begin();it!= ma.end();++it){
      if((*it).first!='?'&&(*it).second>max){
        max=(*it).second;
        ch=(*it).first;
      }
   }
   int sum=4*ma[ch]-ma['A']-ma['C']-ma['G']-ma['T'];
   if((ma['?']-sum)%4!=0||ma['?']<sum){
       cout<<"===";
   }
   int g=ma['?'];
   ma['A']=max-ma['A'];
   ma['C']=max-ma['C'];
   ma['G']=max-ma['G'];
   ma['T']=max-ma['T'];
   if((ma['?']-sum)%4==0&&ma['?']>=sum) {
      ma['?']=0;
      map<char,int>::iterator it1=ma.begin();
      for(i=0;i<n;i++){
         if(s[i]!='?'){
            cout<<s[i];
         }
         if(coun<=sum&&s[i]=='?'){
            while((*it1).second==0&&it1!=ma.end()){
                ++it1;
            }
            if((*it1).second!=0){
            cout<<(*it1).first;
            coun++;
            ma[(*it1).first]--;}
            if((*it1).second==0&&it1!=ma.end()){
                ++it1;
            }
            if(coun>sum||(g==n)){
              cout<<p[z%4];
              z++;
           }

         }
      }
   }
   return 0;

 }


#include <bits/stdc++.h>
#define nmax 260
using namespace std;
char a[nmax],sol[nmax];
int n,nrintrebari,nra,nrg,nrt,nrc;
void Citire()
{
    int i;
    cin>>n>>(a+1);
    for(i=1; i<=n; i++)
        if(a[i]=='?')
            nrintrebari++;
        else if(a[i]=='A')
            nra++;
        else if(a[i]=='G')
            nrg++;
        else if(a[i]=='T')
            nrt++;
        else nrc++;
}
void Rezolvare()
{
    int maxim=-1,s=0,i;
    if(nra==nrg && nra==nrt && nra==nrc && nrintrebari==0)
        cout<<(a+1)<<"\n";
    else if(nrintrebari==0)
        cout<<"===\n";
    else
    {
        maxim=max(max(nra,nrg),nrt);
        maxim=max(maxim,nrc);
        if(maxim!=nra)
            s+=maxim-nra;
        if(maxim!=nrg)
            s+=maxim-nrg;
        if(maxim!=nrt)
            s+=maxim-nrt;
        if(maxim!=nrc)
            s+=maxim-nrc;
        if(nrintrebari<s)
            cout<<"===\n";
        else if(s==0)
        {
            if(nrintrebari%4==0)
            {
                nrintrebari/=4;
                nra=nrg=nrt=nrc=nrintrebari;
                for(i=1; i<=n; i++)
                {
                    if(a[i]=='?')
                    {
                        if(nra!=0)
                        {
                            sol[i]='A';
                            nra--;
                        }
                        else if(nrg!=0)
                        {
                            sol[i]='G';
                            nrg--;
                        }
                        else if(nrt!=0)
                        {
                            sol[i]='T';
                            nrt--;
                        }
                        else
                        {
                            sol[i]='C';
                            nrc--;
                        }
                    }
                    else sol[i]=a[i];
                }
                for(i=1; i<=n; i++)
                    cout<<sol[i];
                cout<<"\n";
            }
            else cout<<"===\n";
        }
        else
        {
                nrintrebari-=s;
                if(nrintrebari>0)
                {
                    if(nrintrebari%4!=0)
                        cout<<"===\n";
                    else
                    {
                        if(nra!=maxim)
                            nra=nrintrebari/4+(maxim-nra);
                        else nra=nrintrebari/4;
                        if(nrg!=maxim)
                            nrg=nrintrebari/4+(maxim-nrg);
                        else nrg=nrintrebari/4;
                        if(nrt!=maxim)
                            nrt=nrintrebari/4+(maxim-nrt);
                        else nrt=nrintrebari/4;
                        if(nrc!=maxim)
                            nrc=nrintrebari/4+(maxim-nrc);
                        else nrc=nrintrebari/4;
                        for(i=1; i<=n; i++)
                        {
                            if(a[i]=='?')
                            {
                                if(nra!=0)
                                {
                                    sol[i]='A';
                                    nra--;
                                }
                                else if(nrg!=0)
                                {
                                    sol[i]='G';
                                    nrg--;
                                }
                                else if(nrt!=0)
                                {
                                    sol[i]='T';
                                    nrt--;
                                }
                                else
                                {
                                    sol[i]='C';
                                    nrc--;
                                }
                            }
                            else sol[i]=a[i];
                        }
                        for(i=1; i<=n; i++)
                            cout<<sol[i];
                        cout<<"\n";
                    }
                }
                else
                {
                    nra=nrg=nrt=nrc=1;
                    for(i=1; i<=n; i++)
                    {
                        if(a[i]=='?')
                        {
                            if(nra!=0)
                            {
                                sol[i]='A';
                                nra--;
                            }
                            else if(nrg!=0)
                            {
                                sol[i]='G';
                                nrg--;
                            }
                            else if(nrt!=0)
                            {
                                sol[i]='T';
                                nrt--;
                            }
                            else
                            {
                                sol[i]='C';
                                nrc--;
                            }
                        }
                        else sol[i]=a[i];
                    }
                    for(i=1; i<=n; i++)
                        cout<<sol[i];
                    cout<<"\n";
                }
        }
    }
}

int main()
{
    Citire();
    Rezolvare();
    return 0;
}


#include <bits/stdc++.h>
#define nmax 260
using namespace std;
char a[nmax],sol[nmax];
int n,nrintrebari,nra,nrg,nrt,nrc;
void Citire()
{
    int i;
    cin>>n>>(a+1);
    for(i=1; i<=n; i++)
        if(a[i]=='?')
            nrintrebari++;
        else if(a[i]=='A')
            nra++;
        else if(a[i]=='G')
            nrg++;
        else if(a[i]=='T')
            nrt++;
        else nrc++;
}
void Rezolvare()
{
    int maxim=-1,s=0,i;
    if(nra==nrg && nra==nrt && nra==nrc && nrintrebari==0)
        cout<<(a+1)<<"\n";
    else if(nrintrebari==0)
        cout<<"===\n";
    else
    {
        maxim=max(max(nra,nrg),nrt);
        maxim=max(maxim,nrc);
        if(maxim!=nra)
            s+=maxim-nra;
        if(maxim!=nrg)
            s+=maxim-nrg;
        if(maxim!=nrt)
            s+=maxim-nrt;
        if(maxim!=nrc)
            s+=maxim-nrc;
        if(nrintrebari<s)
            cout<<"===\n";
        if(s==0)
        {
            if(nrintrebari%4==0)
            {
                nrintrebari/=4;
                nra=nrg=nrt=nrc=nrintrebari;
                for(i=1; i<=n; i++)
                {
                    if(a[i]=='?')
                    {
                        if(nra!=0)
                        {
                            sol[i]='A';
                            nra--;
                        }
                        else if(nrg!=0)
                        {
                            sol[i]='G';
                            nrg--;
                        }
                        else if(nrt!=0)
                        {
                            sol[i]='T';
                            nrt--;
                        }
                        else
                        {
                            sol[i]='C';
                            nrc--;
                        }
                    }
                    else sol[i]=a[i];
                }
                for(i=1; i<=n; i++)
                    cout<<sol[i];
                cout<<"\n";
            }
            else cout<<"===\n";
        }
        else
        {
            nrintrebari-=s;
            if(nrintrebari>0)
            {
                if(nrintrebari%4!=0)
                    cout<<"===\n";
                else
                {
                    if(nra!=maxim)
                        nra=nrintrebari/4+(maxim-nra);
                    else nra=nrintrebari/4;
                    if(nrg!=maxim)
                        nrg=nrintrebari/4+(maxim-nrg);
                    else nrg=nrintrebari/4;
                    if(nrt!=maxim)
                        nrt=nrintrebari/4+(maxim-nrt);
                    else nrt=nrintrebari/4;
                    if(nrc!=maxim)
                        nrc=nrintrebari/4+(maxim-nrc);
                    else nrc=nrintrebari/4;
                    for(i=1; i<=n; i++)
                    {
                        if(a[i]=='?')
                        {
                            if(nra!=0)
                            {
                                sol[i]='A';
                                nra--;
                            }
                            else if(nrg!=0)
                            {
                                sol[i]='G';
                                nrg--;
                            }
                            else if(nrt!=0)
                            {
                                sol[i]='T';
                                nrt--;
                            }
                            else
                            {
                                sol[i]='C';
                                nrc--;
                            }
                        }
                        else sol[i]=a[i];
                    }
                    for(i=1; i<=n; i++)
                        cout<<sol[i];
                    cout<<"\n";
                }
            }
            else
            {
                if(nra==nrt && nra==nrg && nra==nrc)
                {
                    nra=nrg=nrt=nrc=1;
                    for(i=1; i<=n; i++)
                    {
                        if(a[i]=='?')
                        {
                            if(nra!=0)
                            {
                                sol[i]='A';
                                nra--;
                            }
                            else if(nrg!=0)
                            {
                                sol[i]='G';
                                nrg--;
                            }
                            else if(nrt!=0)
                            {
                                sol[i]='T';
                                nrt--;
                            }
                            else
                            {
                                sol[i]='C';
                                nrc--;
                            }
                        }
                        else sol[i]=a[i];
                    }
                    for(i=1; i<=n; i++)
                        cout<<sol[i];
                    cout<<"\n";
                }
                else
                {
                    if(nra<maxim)
                        nra=maxim-nra;
                    else nra=0;
                    if(nrt<maxim)
                        nrt=maxim-nrt;
                    else nrt=0;
                    if(nrc<maxim)
                        nrc=maxim-nrc;
                    else nrc=0;
                    if(nrg<maxim)
                        nrg=maxim-nrg;
                    else nrg=0;
                        for(i=1; i<=n; i++)
                        {
                            if(a[i]=='?')
                            {
                                if(nra!=0)
                                {
                                    sol[i]='A';
                                    nra--;
                                }
                                else if(nrg!=0)
                                {
                                    sol[i]='G';
                                    nrg--;
                                }
                                else if(nrt!=0)
                                {
                                    sol[i]='T';
                                    nrt--;
                                }
                                else
                                {
                                    sol[i]='C';
                                    nrc--;
                                }
                            }
                            else sol[i]=a[i];
                        }
                    for(i=1; i<=n; i++)
                        cout<<sol[i];
                    cout<<"\n";
                }
            }
        }
    }
}

int main()
{
    Citire();
    Rezolvare();
    return 0;
}


#include <bits/stdc++.h>
#define nmax 260
using namespace std;
char a[nmax],sol[nmax];
int n,nrintrebari,nra,nrg,nrt,nrc;
void Citire()
{
    int i;
    cin>>n>>(a+1);
    for(i=1; i<=n; i++)
        if(a[i]=='?')
            nrintrebari++;
        else if(a[i]=='A')
            nra++;
        else if(a[i]=='G')
            nrg++;
        else if(a[i]=='T')
            nrt++;
        else nrc++;
}
void Rezolvare()
{
    int maxim=-1,s=0,i;
    if(nra==nrg && nra==nrt && nra==nrc && nrintrebari==0)
        cout<<(a+1)<<"\n";
    else if(nrintrebari==0)
        cout<<"===\n";
    else
    {
        maxim=max(max(nra,nrg),nrt);
        maxim=max(maxim,nrc);
        if(maxim!=nra)
            s+=maxim-nra;
        if(maxim!=nrg)
            s+=maxim-nrg;
        if(maxim!=nrt)
            s+=maxim-nrt;
        if(maxim!=nrc)
            s+=maxim-nrc;
        if(nrintrebari<s)
            cout<<"===\n";
        else if(s==0)
        {
            if(nrintrebari%4==0)
            {
                nrintrebari/=4;
                nra=nrg=nrt=nrc=nrintrebari;
                for(i=1; i<=n; i++)
                {
                    if(a[i]=='?')
                    {
                        if(nra!=0)
                        {
                            sol[i]='A';
                            nra--;
                        }
                        else if(nrg!=0)
                        {
                            sol[i]='G';
                            nrg--;
                        }
                        else if(nrt!=0)
                        {
                            sol[i]='T';
                            nrt--;
                        }
                        else
                        {
                            sol[i]='C';
                            nrc--;
                        }
                    }
                    else sol[i]=a[i];
                }
                for(i=1; i<=n; i++)
                    cout<<sol[i];
                cout<<"\n";
            }
            else cout<<"===\n";
        }
        else
        {
            if(nrintrebari%s!=0)
                cout<<"===\n";
            else
            {
                nrintrebari-=s;
                if(nrintrebari>0)
                {
                    if(nrintrebari%4!=0)
                        cout<<"===\n";
                    else
                    {
                        if(nra!=maxim)
                            nra=nrintrebari/4+(maxim-nra);
                        else nra=nrintrebari/4;
                        if(nrg!=maxim)
                            nrg=nrintrebari/4+(maxim-nrg);
                        else nrg=nrintrebari/4;
                        if(nrt!=maxim)
                            nrt=nrintrebari/4+(maxim-nrt);
                        else nrt=nrintrebari/4;
                        if(nrc!=maxim)
                            nrc=nrintrebari/4+(maxim-nrc);
                        else nrc=nrintrebari/4;
                        for(i=1; i<=n; i++)
                        {
                            if(a[i]=='?')
                            {
                                if(nra!=0)
                                {
                                    sol[i]='A';
                                    nra--;
                                }
                                else if(nrg!=0)
                                {
                                    sol[i]='G';
                                    nrg--;
                                }
                                else if(nrt!=0)
                                {
                                    sol[i]='T';
                                    nrt--;
                                }
                                else
                                {
                                    sol[i]='C';
                                    nrc--;
                                }
                            }
                            else sol[i]=a[i];
                        }
                        for(i=1; i<=n; i++)
                            cout<<sol[i];
                        cout<<"\n";
                    }
                }
                else
                {
                    nra=nrg=nrt=nrc=1;
                    for(i=1; i<=n; i++)
                    {
                        if(a[i]=='?')
                        {
                            if(nra!=0)
                            {
                                sol[i]='A';
                                nra--;
                            }
                            else if(nrg!=0)
                            {
                                sol[i]='G';
                                nrg--;
                            }
                            else if(nrt!=0)
                            {
                                sol[i]='T';
                                nrt--;
                            }
                            else
                            {
                                sol[i]='C';
                                nrc--;
                            }
                        }
                        else sol[i]=a[i];
                    }
                    for(i=1; i<=n; i++)
                        cout<<sol[i];
                    cout<<"\n";
                }
            }
        }
    }
}

int main()
{
    Citire();
    Rezolvare();
    return 0;
}


#include <bits/stdc++.h>
#define nmax 260
using namespace std;
char a[nmax],sol[nmax];
int n,nrintrebari,nra,nrg,nrt,nrc;
void Citire()
{
    int i;
    cin>>n>>(a+1);
    for(i=1; i<=n; i++)
        if(a[i]=='?')
            nrintrebari++;
        else if(a[i]=='A')
            nra++;
        else if(a[i]=='G')
            nrg++;
        else if(a[i]=='T')
            nrt++;
        else nrc++;
}
void Rezolvare()
{
    int maxim=-1,s=0,i;
    if(nra==nrg && nra==nrt && nra==nrc && nrintrebari==0)
        cout<<(a+1)<<"\n";
    else if(nrintrebari==0)
        cout<<"===\n";
    else
    {
        maxim=max(max(nra,nrg),nrt);
        maxim=max(maxim,nrc);
        if(maxim!=nra)
            s+=maxim-nra;
        if(maxim!=nrg)
            s+=maxim-nrg;
        if(maxim!=nrt)
            s+=maxim-nrt;
        if(maxim!=nrc)
            s+=maxim-nrc;
        if(nrintrebari<s)
            cout<<"===\n";
        if(s==0)
        {
            if(nrintrebari%4==0)
            {
                nrintrebari/=4;
                nra=nrg=nrt=nrc=nrintrebari;
                for(i=1; i<=n; i++)
                {
                    if(a[i]=='?')
                    {
                        if(nra!=0)
                        {
                            sol[i]='A';
                            nra--;
                        }
                        else if(nrg!=0)
                        {
                            sol[i]='G';
                            nrg--;
                        }
                        else if(nrt!=0)
                        {
                            sol[i]='T';
                            nrt--;
                        }
                        else
                        {
                            sol[i]='C';
                            nrc--;
                        }
                    }
                    else sol[i]=a[i];
                }
                for(i=1; i<=n; i++)
                    cout<<sol[i];
                cout<<"\n";
            }
            else cout<<"===\n";
        }
        else
        {
            nrintrebari-=s;
            if(nrintrebari>0)
            {
                if(nrintrebari%4!=0)
                    cout<<"===\n";
                else
                {
                    if(nra!=maxim)
                        nra=nrintrebari/4+(maxim-nra);
                    else nra=nrintrebari/4;
                    if(nrg!=maxim)
                        nrg=nrintrebari/4+(maxim-nrg);
                    else nrg=nrintrebari/4;
                    if(nrt!=maxim)
                        nrt=nrintrebari/4+(maxim-nrt);
                    else nrt=nrintrebari/4;
                    if(nrc!=maxim)
                        nrc=nrintrebari/4+(maxim-nrc);
                    else nrc=nrintrebari/4;
                    for(i=1; i<=n; i++)
                    {
                        if(a[i]=='?')
                        {
                            if(nra!=0)
                            {
                                sol[i]='A';
                                nra--;
                            }
                            else if(nrg!=0)
                            {
                                sol[i]='G';
                                nrg--;
                            }
                            else if(nrt!=0)
                            {
                                sol[i]='T';
                                nrt--;
                            }
                            else
                            {
                                sol[i]='C';
                                nrc--;
                            }
                        }
                        else sol[i]=a[i];
                    }
                    for(i=1; i<=n; i++)
                        cout<<sol[i];
                    cout<<"\n";
                }
            }
            else
            {
                if(nra==nrt && nra==nrg && nra==nrc)
                {
                    nra=nrg=nrt=nrc=1;
                    for(i=1; i<=n; i++)
                    {
                        if(a[i]=='?')
                        {
                            if(nra!=0)
                            {
                                sol[i]='A';
                                nra--;
                            }
                            else if(nrg!=0)
                            {
                                sol[i]='G';
                                nrg--;
                            }
                            else if(nrt!=0)
                            {
                                sol[i]='T';
                                nrt--;
                            }
                            else
                            {
                                sol[i]='C';
                                nrc--;
                            }
                        }
                        else sol[i]=a[i];
                    }
                    for(i=1; i<=n; i++)
                        cout<<sol[i];
                    cout<<"\n";
                }
                else
                {
                    if(nra!=maxim)
                        nra=maxim;
                    else nra=0;
                    if(nrt!=maxim)
                        nrt=maxim;
                    else nrt=0;
                    if(nrc!=maxim)
                        nrc=maxim;
                    else nrc=0;
                    if(nrg!=maxim)
                        nrg=maxim;
                    else nrg=0;
                        for(i=1; i<=n; i++)
                        {
                            if(a[i]=='?')
                            {
                                if(nra!=0)
                                {
                                    sol[i]='A';
                                    nra--;
                                }
                                else if(nrg!=0)
                                {
                                    sol[i]='G';
                                    nrg--;
                                }
                                else if(nrt!=0)
                                {
                                    sol[i]='T';
                                    nrt--;
                                }
                                else
                                {
                                    sol[i]='C';
                                    nrc--;
                                }
                            }
                            else sol[i]=a[i];
                        }
                    for(i=1; i<=n; i++)
                        cout<<sol[i];
                    cout<<"\n";
                }
            }
        }
    }
}

int main()
{
    Citire();
    Rezolvare();
    return 0;
}


#include <bits/stdc++.h>
#define nmax 260
using namespace std;
char a[nmax],sol[nmax];
int n,nrintrebari,nra,nrg,nrt,nrc;
void Citire()
{
    int i;
    cin>>n>>(a+1);
    for(i=1; i<=n; i++)
        if(a[i]=='?')
            nrintrebari++;
        else if(a[i]=='A')
            nra++;
        else if(a[i]=='G')
            nrg++;
        else if(a[i]=='T')
            nrt++;
        else nrc++;
}
void Rezolvare()
{
    int maxim=-1,s=0,i;
    if(nra==nrg && nra==nrt && nra==nrc && nrintrebari==0)
        cout<<(a+1)<<"\n";
    else if(nrintrebari==0)
        cout<<"===\n";
    else
    {
        maxim=max(max(nra,nrg),nrt);
        maxim=max(maxim,nrc);
        if(maxim!=nra)
            s+=maxim-nra;
        if(maxim!=nrg)
            s+=maxim-nrg;
        if(maxim!=nrt)
            s+=maxim-nrt;
        if(maxim!=nrc)
            s+=maxim-nrc;
        if(nrintrebari<s)
            cout<<"===\n";
       else if(s==0)
        {
            if(nrintrebari%4==0)
            {
                nrintrebari/=4;
                nra=nrg=nrt=nrc=nrintrebari;
                for(i=1; i<=n; i++)
                {
                    if(a[i]=='?')
                    {
                        if(nra!=0)
                        {
                            sol[i]='A';
                            nra--;
                        }
                        else if(nrg!=0)
                        {
                            sol[i]='G';
                            nrg--;
                        }
                        else if(nrt!=0)
                        {
                            sol[i]='T';
                            nrt--;
                        }
                        else
                        {
                            sol[i]='C';
                            nrc--;
                        }
                    }
                    else sol[i]=a[i];
                }
                for(i=1; i<=n; i++)
                    cout<<sol[i];
                cout<<"\n";
            }
            else
                cout<<"===\n";
        }
        else
        {
            nrintrebari-=s;
            if(nrintrebari>0)
            {
                if(nrintrebari%4!=0)
                    cout<<"===\n";
                else
                {
                    if(nra!=maxim)
                        nra=nrintrebari/4+(maxim-nra);
                    else nra=nrintrebari/4;
                    if(nrg!=maxim)
                        nrg=nrintrebari/4+(maxim-nrg);
                    else nrg=nrintrebari/4;
                    if(nrt!=maxim)
                        nrt=nrintrebari/4+(maxim-nrt);
                    else nrt=nrintrebari/4;
                    if(nrc!=maxim)
                        nrc=nrintrebari/4+(maxim-nrc);
                    else nrc=nrintrebari/4;
                    for(i=1; i<=n; i++)
                    {
                        if(a[i]=='?')
                        {
                            if(nra!=0)
                            {
                                sol[i]='A';
                                nra--;
                            }
                            else if(nrg!=0)
                            {
                                sol[i]='G';
                                nrg--;
                            }
                            else if(nrt!=0)
                            {
                                sol[i]='T';
                                nrt--;
                            }
                            else
                            {
                                sol[i]='C';
                                nrc--;
                            }
                        }
                        else sol[i]=a[i];
                    }
                    for(i=1; i<=n; i++)
                        cout<<sol[i];
                    cout<<"\n";
                }
            }
            else
            {
                if(nra==nrt && nra==nrg && nra==nrc)
                {
                    nra=nrg=nrt=nrc=1;
                    for(i=1; i<=n; i++)
                    {
                        if(a[i]=='?')
                        {
                            if(nra!=0)
                            {
                                sol[i]='A';
                                nra--;
                            }
                            else if(nrg!=0)
                            {
                                sol[i]='G';
                                nrg--;
                            }
                            else if(nrt!=0)
                            {
                                sol[i]='T';
                                nrt--;
                            }
                            else
                            {
                                sol[i]='C';
                                nrc--;
                            }
                        }
                        else sol[i]=a[i];
                    }
                    for(i=1; i<=n; i++)
                        cout<<sol[i];
                    cout<<"\n";
                }
                else
                {
                    if(nra<maxim)
                        nra=maxim-nra;
                    else nra=0;
                    if(nrt<maxim)
                        nrt=maxim-nrt;
                    else nrt=0;
                    if(nrc<maxim)
                        nrc=maxim-nrc;
                    else nrc=0;
                    if(nrg<maxim)
                        nrg=maxim-nrg;
                    else nrg=0;
                        for(i=1; i<=n; i++)
                        {
                            if(a[i]=='?')
                            {
                                if(nra!=0)
                                {
                                    sol[i]='A';
                                    nra--;
                                }
                                else if(nrg!=0)
                                {
                                    sol[i]='G';
                                    nrg--;
                                }
                                else if(nrt!=0)
                                {
                                    sol[i]='T';
                                    nrt--;
                                }
                                else
                                {
                                    sol[i]='C';
                                    nrc--;
                                }
                            }
                            else sol[i]=a[i];
                        }
                    for(i=1; i<=n; i++)
                        cout<<sol[i];
                    cout<<"\n";
                }
            }
        }
    }
}

int main()
{
    Citire();
    Rezolvare();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int max(int a, int b){ return a > b ? a : b; }

int main()
{
	int a = 0, c = 0, g = 0, t = 0, w = 0;
	string str;
	int n;
	cin >> n;
	cin >> str;
	if (str.length() % 4){
		cout << "===" << endl;
	}
	else{
		int la, lc, lg, lt;
		for (int i = 0; i < str.length(); i++){
			if (str[i] == 'A')a++;
			if (str[i] == 'C')c++;
			if (str[i] == 'G')g++;
			if (str[i] == 'T')t++;
			if (str[i] == '?')w++;
		}
		if (a==0||c==0||g==0||t==0){
			cout << "===" << endl;
			return 0;
		}
		int m = max(a, max(c, max(g, t)));
		la = m - a;
		lc = m - c;
		lg = m - g;
		lt = m - t;
		for (int i = 0; i < str.length(); i++){

			if (str[i] == '?'){
				w--;
				if (la){
					str[i] = 'A';
					la--;
				}
				else if (lc){
					str[i] = 'C';
					lc--;
				}
				else if (lg){
					str[i] = 'G';
					lg--;
				}
				else if (lt){
					str[i] = 'T';
					lt--;
				}
			}
		}
		if (w == 0){
			cout << str << endl;
		}
		else {
			cout << "===" << endl;
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
	int n;
	cin >> n;
	string str;
	cin >> str;
	if (n % 4)cout << "===" << endl;
	else{

		int na, ng, nt, nc;
		na = ng = nt = nc = n / 4;
		int fl = 1;
		int a = 0, g = 0, t = 0, c = 0, w = 0;
		for (int i = 0; i < n; i++){
			if (str[i] == 'A')a++;
			if (str[i] == 'G')g++;
			if (str[i] == 'C')c++;
			if (str[i] == 'T')t++;
		}
		if (a>na)fl = 0;
		if (g>ng)fl = 0;
		if (c>nc)fl = 0;
		if (t>nt)fl = 0;
		na -= a;
		ng -= g;
		nt -= t;
		nc -= c;
		if (!fl){
			cout << "===" << endl;

		}
		else{
			for (int i = 0; i < str.length(); i++){
				if (str[i] == '?'){
					if (na){
						str[i] = 'A';
						na--;
					}
					else if (nc){
						str[i] = 'C';
						nc--;
					}
					else if (ng){
						str[i] = 'G';
						ng--;
					}
					else if (nt){
						str[i] = 'T';
						nt--;
					}
				}
			}
			cout << str << endl;
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

int max(int a, int b){ return a > b ? a : b; }

int main()
{
	int a = 0, c = 0, g = 0, t = 0, w = 0;
	string str;
	int n;
	cin >> n;
	cin >> str;
	if (str.length() % 4){
		cout << "===" << endl;
	}
	else{
		int la, lc, lg, lt;
		for (int i = 0; i < str.length(); i++){
			if (str[i] == 'A')a++;
			if (str[i] == 'C')c++;
			if (str[i] == 'G')g++;
			if (str[i] == 'T')t++;
			if (str[i] == '?')w++;
		}

		int m = max(a, max(c, max(g, t)));
		la = m - a;
		lc = m - c;
		lg = m - g;
		lt = m - t;
		for (int i = 0; i < str.length(); i++){

			if (str[i] == '?'){
				if (la){
					str[i] = 'A';
					a++;
					la--;
				}
				else if (lc){
					str[i] = 'C';
					c++;
					lc--;
				}
				else if (lg){
					str[i] = 'G';
					g++;
					lg--;
				}
				else if (lt){
					str[i] = 'T';
					t++;
					lt--;
				}
				else{
					break;
				}
				w--;
			}
		}
		if (w == 0 && g == t == c == a){
			cout << str << endl;
		}
		else {
			if (w % 4)cout << "===" << endl;
			else{
				la = lc = lg = lt = w / 4;
				for (int i = 0; i < str.length(); i++){
					if (str[i] == '?'){
						if (la){
							str[i] = 'A';
							a++;
							la--;
						}
						else if (lc){
							str[i] = 'C';
							c++;
							lc--;
						}
						else if (lg){
							str[i] = 'G';
							g++;
							lg--;
						}
						else if (lt){
							str[i] = 'T';
							t++;
							lt--;
						}
					}
				}
				if (g == t == c == a){
					cout << str << endl;
				}
				else{
					cout << "===" << endl;
				}
			}
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

int max(int a, int b){ return a > b ? a : b; }

int main()
{
	int a = 0, c = 0, g = 0, t = 0, w = 0;
	string str;
	int n;
	cin >> n;
	cin >> str;
	if (str.length() % 4){
		cout << "===" << endl;
	}
	else{
		int la, lc, lg, lt;
		for (int i = 0; i < str.length(); i++){
			if (str[i] == 'A')a++;
			if (str[i] == 'C')c++;
			if (str[i] == 'G')g++;
			if (str[i] == 'T')t++;
			if (str[i] == '?')w++;
		}
		int m = max(a, max(c, max(g, t)));
		la = m - a;
		lc = m - c;
		lg = m - g;
		lt = m - t;
		for (int i = 0; i < str.length(); i++){

			if (str[i] == '?'){
				w--;
				if (la){
					str[i] = 'A';
					la--;
				}
				else if (lc){
					str[i] = 'C';
					lc--;
				}
				else if (lg){
					str[i] = 'G';
					lg--;
				}
				else if (lt){
					str[i] = 'T';
					lt--;
				}
			}
		}
		if (w == 0){
			cout << str << endl;
		}
		else {
			cout << "===" << endl;
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

int max(int a, int b){ return a > b ? a : b; }

int main()
{
	int a = 0, c = 0, g = 0, t = 0, w = 0;
	string str;
	int n;
	cin >> n;
	cin >> str;
	if (str.length() % 4){
		cout << "===" << endl;
	}
	else{
		int la, lc, lg, lt;
		for (int i = 0; i < str.length(); i++){
			if (str[i] == 'A')a++;
			if (str[i] == 'C')c++;
			if (str[i] == 'G')g++;
			if (str[i] == 'T')t++;
			if (str[i] == '?')w++;
		}

		int m = max(a, max(c, max(g, t)));
		la = m - a;
		lc = m - c;
		lg = m - g;
		lt = m - t;
		for (int i = 0; i < str.length(); i++){

			if (str[i] == '?'){
				if (la){
					str[i] = 'A';
					la--;
				}
				else if (lc){
					str[i] = 'C';
					lc--;
				}
				else if (lg){
					str[i] = 'G';
					lg--;
				}
				else if (lt){
					str[i] = 'T';
					lt--;
				}
				else{
					break;
				}
				w--;
			}
		}
		if (w == 0){
			cout << str << endl;
		}
		else {
			if (w % 4)cout << "===" << endl;
			else{
				la = lc = lg = lt = w / 4;
				for (int i = 0; i < str.length(); i++){
					if (str[i] == '?'){
						if (la){
							str[i] = 'A';
							la--;
						}
						else if (lc){
							str[i] = 'C';
							lc--;
						}
						else if (lg){
							str[i] = 'G';
							lg--;
						}
						else if (lt){
							str[i] = 'T';
							lt--;
						}
					}
				}
				cout << str << endl;
			}
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    int n,i,a[4]={0},x=0;string s;
    cin>>n>>s;
    if(n%4!=0)
    {cout<<"===";return 0;}

    for(i=0;i<n;i++)
    {
        switch(s[i])
        {
            case 'A':a[0]++;break;
            case 'C':a[1]++;break;
            case 'G':a[2]++;break;
            case 'T':a[3]++;break;
        }
    }
    x=n/4;
    for(i=0;i<4;i++)
    {
        if(a[i]>x)
        {cout<<"===";return 0;}
    }
    for(i=0;i<n;i++)
    {
        if(s[i]=='?')
        {
            if(x-a[0])
            {cout<<'A';a[0]++;}
            else if(x-a[1])
           {cout<<'C';a[1]++;}
           else if(x-a[2])
           {cout<<'G';a[2]++;}
           else {cout<<'T';}
        }
        else cout<<s[i];
    }

}


#include<iostream>
using namespace std;
main()
{
    ios_base::sync_with_stdio(false;)
    cin.tie(NULL);cout.tie(NULL);
    int n,i,a[4]={0},x=0;string s;
    cin>>n>>s;
    if(n%4!=0)
    cout<<"===";return 0;
    for(i=0;i<n;i++)
    {
        switch(s[i])
        {
            case 'A':a[0]++;break;
            case 'C':a[1]++;break;
            case 'G':a[2]++;break;
            case 'T':a[3]++;break;
        }
    }
    x=n/4;
    for(i=0;i<4;i++)
    {
        if(a[i]>x)
        {cout<<"===";return 0;}
    }
    for(i=0;i<n;i++)
    {
        if(s[i]=='?')
        {
            if(x-a[0])
            {cout<<'A';a[0]++;}
            else if(x-a[1])
           {cout<<'C';a[1]++;}
           else if(x-a[2])
           {cout<<'G';a[2]++;}
           else {cout<<'T';}
        }
        else cout<<s[i];
    }

}


#include<iostream>
using namespace std;
main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    int n,i,a[4]={0},x=0;string s;
    cin>>n>>s;
    if(n%4!=0)
    cout<<"===";return 0;
    for(i=0;i<n;i++)
    {
        switch(s[i])
        {
            case 'A':a[0]++;break;
            case 'C':a[1]++;break;
            case 'G':a[2]++;break;
            case 'T':a[3]++;break;
        }
    }
    x=n/4;
    for(i=0;i<4;i++)
    {
        if(a[i]>x)
        {cout<<"===";return 0;}
    }
    for(i=0;i<n;i++)
    {
        if(s[i]=='?')
        {
            if(x-a[0])
            {cout<<'A';a[0]++;}
            else if(x-a[1])
           {cout<<'C';a[1]++;}
           else if(x-a[2])
           {cout<<'G';a[2]++;}
           else {cout<<'T';}
        }
        else cout<<s[i];
    }

}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;
int a[5];
char p[]="0AGCT";
int main(){
    int n;
    string s;
    cin>>n>>s;
    if(n%4==0){
    int t=n/4;
     for(int i=0;i<n;i++){
        if(s[i]=='A'){
            a[1]++;
        }
        if(s[i]=='G'){
            a[2]++;
        }
        if(s[i]=='C'){
            a[3]++;
        }
        if(s[i]=='T'){
            a[4]++;
        }
    }
    for(int i=1;i<=4;i++){
        if(a[i]>t){
            printf("===");
            return 0;
        }
    }
    for(int i=0;i<n;i++){
        if(s[i]=='?')
        for(int j=1;j<=4;j++){
            if(a[j]<t){
                cout<<p[j];
                a[j]++;
                break;
            }
        }
        else{
            cout<<s[i];
        }

    }

    }else{
        printf("===");
    }
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
using namespace std;

int main() {
    string n;
    int num;
    cin >> num;
    vector <int> pos;
    int cnt=0, sub=0, div=0;
    char g[4] = {'A', 'C', 'G', 'T'};
    set<char> temp;
    map<char, int> mi;
    map<char,int> mi2;
    cin >> n;
    div = num/4;
    bool flag = true;
    for(int i=0; i<4; i++){
        temp.insert(g[i]);
    }
    for(int i=0; i<num; i++){
        if(temp.count(n[i])){
            mi[n[i]]++;
            cnt++;
        }
        else{
            pos.push_back(i);
        }
    }
    for(map<char,int>::iterator itr = mi.begin(); itr!=mi.end(); ++itr){
        if(itr->second != div){
            mi2[itr->first] = itr->second;
        }
    }
    sub = num - cnt;
    if(num %4 != 0){
        cout << "===" << '\n';
    }
    else if(num%4==0 && sub == 0){
        for(map<char, int>::iterator itr = mi.begin(); itr!=mi.end() && flag; ++itr){
            if(itr->second != div){
                cout << "===" << '\n';
                flag = false;
                cout << "bandera fue false" << endl;
            }
        }
        if(flag){
            cout << n << '\n';
        }
    }
    else{
        for(map<char, int>::iterator itr = mi.begin(); itr!=mi.end() && sub !=0; ++itr){
            if(itr->second != div){
                itr->second++;
                sub--;
            }
        }
        bool flag2 = true;
        for(map<char, int>::iterator itr = mi.begin(); itr!=mi.end() && flag2; ++itr){
            if(itr->second != div){
                cout << "===" << '\n';
                flag2 = false;
            }
        }
        int k=0, l=0;
        string result = "";
        for(int i=0; i<num; i++){
            if(i==pos[k]){
                for(map<char,int>::iterator itr = mi2.begin(); itr!=mi2.end(); ++itr){
                    if(itr->second != 0){
                        result+=itr->first;
                        itr->second--;
                    }
                }
                k++;
            }
            else{
                result+=n[i];
            }
        }
        if(flag2){
            cout << result << '\n';
        }
    }
}


#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
using namespace std;

int main() {
    string n;
    int num;
    cin >> num;
    vector <int> pos;
    int cnt=0, sub=0, div=0;
    char g[4] = {'A', 'C', 'G', 'T'};
    set<char> temp;
    map<char, int> mi;
    map<char,int> mi2;
    cin >> n;
    div = num/4;
    bool flag = true;
    for(int i=0; i<4; i++){
        temp.insert(g[i]);
    }
    for(int i=0; i<num; i++){
        if(temp.count(n[i])){
            mi[n[i]]++;
            cnt++;
        }
        else{
            pos.push_back(i);
        }
    }
    for(map<char,int>::iterator itr = mi.begin(); itr!=mi.end(); ++itr){
        if(itr->second != div){
            mi2[itr->first] = itr->second;
        }
    }
    sub = num - cnt;
    if(num %4 != 0){
        cout << "===" << '\n';
    }
    //cout << sub << endl;
    else if(num%4==0 && sub == 0){
        for(map<char, int>::iterator itr = mi.begin(); itr!=mi.end() && flag; ++itr){
            if(itr->second != div){
                cout << "===" << '\n';
                flag = false;
                //cout << "bandera fue false" << endl;
            }
        }
        if(flag){
            cout << n << '\n';
        }
    }
    else{
        for(map<char, int>::iterator itr = mi.begin(); itr!=mi.end() && sub !=0; ++itr){
            if(itr->second != div){
                itr->second++;
                sub--;
            }
        }
        bool flag2 = true;
        for(map<char, int>::iterator itr = mi.begin(); itr!=mi.end() && flag2; ++itr){
            if(itr->second != div){
                cout << "===" << '\n';
                flag2 = false;
            }
        }
        int k=0, l=0;
        bool flag3 = true;
        string result = "";
        for(int i=0; i<num; i++){
            if(i==pos[k]){
                for(map<char,int>::iterator itr = mi2.begin(); itr!=mi2.end() && flag3; ++itr){
                    if(itr->second != 0){
                        result+=itr->first;
                        itr->second--;
                        flag3 = false;
                    }
                }
                k++;
                flag3 = true;
            }
            else{
                result+=n[i];
            }
        }
        if(flag2){
            cout << result << '\n';
        }
    }
}


#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
using namespace std;

void mammoth(int len, string s){
    int cnt=0, div=0, quest=0, cuenta=0;
    string genome="";
    set<char> si;
    set<int> pos;
    vector<int> arr(4,0);
    map<char,int> mi;
    div = len /4;
    char c[4] = {'A','C','G','T'};
    for(int i=0; i<4; i++){
        mi[c[i]]=i;
    }
    for(int i=0; i<4; i++){
        si.insert(c[i]);
    }
    for(int i=0; i<len; i++){
        if(si.count(s[i])){
            arr[mi[s[i]]]++;
            cnt++;
        }
        else{
            quest++;
            pos.insert(i);
        }
    }
    //cout << quest << endl;
    //cout << div << endl;
    if(quest == len){
        for(int i=0; i<len; i++){
            for(int j=0; j<div; j++){
                genome+=c[i];
            }
        }
        cout << genome << endl;
        return;
    }

    if(quest == 0){
       for(int i=0; i<4; i++){
            if(arr[i] != div){
                cout << "===" << endl;
                return;
            }
        }
        cout << s << endl;
        return;
    }
    for(int i=0; i<4; i++){
        if(arr[i] > div){
            cout << "===" << endl;
            return;
        }
    }
    bool flag;
    for(int i=0; i<len; i++){
        if(pos.count(i)){
            flag = true;
            for(int j=0; j<4 && flag; j++){
                if(arr[j] < div){
                    genome+=c[j];
                    arr[j]++;
                    flag = false;
                }
            }
        }
        else{
            genome+=s[i];
            //cout << "Entro aqu� en: " << i << endl;
        }
    }
    cout << genome << endl;
    return;
}

int main() {
    int len;
    string s;
    cin >> len >> s;
    if(len%4 != 0){
        cout << "===" << endl;
    }
    else{
        mammoth(len, s);
    }
}


#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
using namespace std;

int main() {
    string n;
    int num;
    cin >> num;
    int cnt=0, sub=0, div=0;
    char g[4] = {'A', 'C', 'G', 'T'};
    set<char> temp;
    map<char, int> mi;
    cin >> n;
    div = num/4;
    bool flag = true;
    for(int i=0; i<4; i++){
        temp.insert(g[i]);
    }
    for(int i=0; i<num; i++){
        if(temp.count(n[i])){
            mi[n[i]]++;
            cnt++;
        }
    }
    sub = num - cnt;
    //cout << sub << endl;
    //cout << div << endl;
    //cout << cnt << endl;
    if(num %4 != 0){
        cout << "===" << '\n';
    }
    else if(num%4==0 && sub == 0){
        for(map<char, int>::iterator itr = mi.begin(); itr!=mi.end() && flag; ++itr){
            if(itr->second != div){
                cout << "===" << '\n';
                flag = false;
                cout << "bandera fue false" << endl;
            }
        }
        if(flag){
            cout << n << '\n';
        }
    }
    else{
        for(map<char, int>::iterator itr = mi.begin(); itr!=mi.end() && sub !=0; ++itr){
            if(itr->second != div){
                itr->second++;
                sub--;
            }
        }
        bool flag2 = true;
        for(map<char, int>::iterator itr = mi.begin(); itr!=mi.end() && flag2; ++itr){
            if(itr->second != div){
                cout << "===" << '\n';
                flag2 = false;
            }
        }
        string result = "";
        for(map<char, int>::iterator itr = mi.begin(); itr!=mi.end(); ++itr){
            for(int i=0; i<itr->second; i++){
                result+=itr->first;
            }
        }
        if(flag2){
            cout << result << '\n';
        }
    }
}


#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
using namespace std;

void mammoth(int len, string s){
    int cnt=0, div=0, quest=0, cuenta=0;
    string genome="";
    set<char> si;
    set<int> pos;
    vector<int> arr(4,0);
    map<char,int> mi;
    div = len /4;
    char c[4] = {'A','C','G','T'};
    for(int i=0; i<4; i++){
        mi[c[i]]=i;
    }
    for(int i=0; i<4; i++){
        si.insert(c[i]);
    }
    for(int i=0; i<len; i++){
        if(si.count(s[i])){
            arr[mi[s[i]]]++;
            cnt++;
        }
        else{
            quest++;
            pos.insert(i);
        }
    }
    //cout << quest << endl;
    //cout << div << endl;
    if(quest == len){
        for(int i=0; i<4; i++){
            for(int j=0; j<div; j++){
                genome+=c[i];
            }
        }
        cout << genome << endl;
        return;
    }

    if(quest == 0){
       for(int i=0; i<4; i++){
            if(arr[i] != div){
                cout << "===" << endl;
                return;
            }
        }
        cout << s << endl;
        return;
    }
    for(int i=0; i<4; i++){
        if(arr[i] > div){
            cout << "===" << endl;
            return;
        }
    }
    bool flag;
    for(int i=0; i<len; i++){
        if(pos.count(i)){
            flag = true;
            for(int j=0; j<4 && flag; j++){
                if(arr[j] < div){
                    genome+=c[j];
                    arr[j]++;
                    flag = false;
                }
            }
        }
        else{
            genome+=s[i];
            //cout << "Entro aqu� en: " << i << endl;
        }
    }
    cout << genome << endl;
    return;
}

int main() {
    int len;
    string s;
    cin >> len >> s;
    if(len%4 != 0){
        cout << "===" << endl;
    }
    else{
        mammoth(len, s);
    }
}


#include <bits/stdc++.h>
using namespace std;
//------------+++---------------//
#define m404(x) cout << #x << " = " << x << endl
#define _ printf(" ")
#define _s(x) cout<<x<<endl
#define __ printf("\n")
#define in(v)  scanf("%i",&v)
#define out(v) printf("%i",v )
#define llin(v)  scanf("%I64d",&v)
#define llout(v)  printf("%I64d",v)
#define fin(v)  scanf("%f",&v)
#define fout(v)  printf("%f",v)
#define din(v)  scanf("%lf",&v)
#define dout(v)  printf("%lf",v)
typedef long long ll;
//------------+++---------------//
// ll power(ll base,ll exp,ll result=1){
// 	while (exp){if (exp & 1)result *= base;exp >>= 1;base *= base;}
// 	return result;
// }
// bool compare(const pair<ll,ll>&i, const pair<ll,ll>&j)
// {
//     return i.first > j.first;
// }
int n,a,c,g,t,mx;
string s;
int main()
{
	in(n);
	cin>>s;
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='A') a++;
		if(s[i]=='C') c++;
		if(s[i]=='G') g++;
		if(s[i]=='T') t++;
	}
	mx=max(a,max(c,max(g,t)));
	a=mx-a;
	c=mx-c;
	g=mx-g;
	t=mx-t;
	if(mx==0){
		cout<<s;
		return 0;
	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='?'){
			if (a)
			{
				s[i]='A';
				a--;
				continue;
			}
			if (c)
			{
				s[i]='C';
				c--;
				continue;
			}
			if (g)
			{
				s[i]='G';
				g--;
				continue;
			}
			if (t)
			{
				s[i]='T';
				t--;
				continue;
			}
		}
	}
	cout<<s;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
//------------+++---------------//
#define m404(x) cout << #x << " = " << x << endl
#define _ printf(" ")
#define _s(x) cout<<x<<endl
#define __ printf("\n")
#define in(v)  scanf("%i",&v)
#define out(v) printf("%i",v )
#define llin(v)  scanf("%I64d",&v)
#define llout(v)  printf("%I64d",v)
#define fin(v)  scanf("%f",&v)
#define fout(v)  printf("%f",v)
#define din(v)  scanf("%lf",&v)
#define dout(v)  printf("%lf",v)
typedef long long ll;
//------------+++---------------//
// ll power(ll base,ll exp,ll result=1){
// 	while (exp){if (exp & 1)result *= base;exp >>= 1;base *= base;}
// 	return result;
// }
// bool compare(const pair<ll,ll>&i, const pair<ll,ll>&j)
// {
//     return i.first > j.first;
// }

int main()
{
	int n,a=0,c=0,g=0,t=0,mx=-1,q=0;
	string s;
	in(n);
	cin>>s;
	if(n%4!=0){
		cout<<"===";
		return 0;
	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='A') a++;
		if(s[i]=='C') c++;
		if(s[i]=='G') g++;
		if(s[i]=='T') t++;
		if(s[i]=='?') q++;
	}
	mx=max(a,max(c,max(g,t)));
	a=mx-a;
	c=mx-c;
	g=mx-g;
	t=mx-t;
	if(q==0){
		cout<<s;
		return 0;
	}
	else if(q<a+c+g+t){
		cout<<"===";
		return 0;
	}
	else{
		int h;
		h=q-(a+c+g+t);
		if(h%4==0){
			h/=4;
			a+=h;
			c+=h;
			g+=h;
			t+=h;
		}
		else{
		cout<<"===";
		return 0;
		}

	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='?'){
			if (a)
			{
				s[i]='A';
				a--;
				q--;
				continue;
			}
			if (c)
			{
				s[i]='C';
				c--;
				q--;
				continue;
			}
			if (g)
			{
				s[i]='G';
				g--;
				q--;
				continue;
			}
			if (t)
			{
				s[i]='T';
				t--;
				q--;
				continue;
			}
		}
	}
	if(q==0)
		cout<<s;
	else
		cout<<"===";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
//------------+++---------------//
#define m404(x) cout << #x << " = " << x << endl
#define _ printf(" ")
#define _s(x) cout<<x<<endl
#define __ printf("\n")
#define in(v)  scanf("%i",&v)
#define out(v) printf("%i",v )
#define llin(v)  scanf("%I64d",&v)
#define llout(v)  printf("%I64d",v)
#define fin(v)  scanf("%f",&v)
#define fout(v)  printf("%f",v)
#define din(v)  scanf("%lf",&v)
#define dout(v)  printf("%lf",v)
typedef long long ll;
//------------+++---------------//
// ll power(ll base,ll exp,ll result=1){
// 	while (exp){if (exp & 1)result *= base;exp >>= 1;base *= base;}
// 	return result;
// }
// bool compare(const pair<ll,ll>&i, const pair<ll,ll>&j)
// {
//     return i.first > j.first;
// }
int n,a,c,g,t,mx,q;
string s;
int main()
{
	in(n);
	cin>>s;
	if(n%4!=0){
		cout<<"===";
		return 0;
	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='A') a++;
		if(s[i]=='C') c++;
		if(s[i]=='G') g++;
		if(s[i]=='T') t++;
		if(s[i]=='?') q++;
	}
	mx=max(a,max(c,max(g,t)));
	a=mx-a;
	c=mx-c;
	g=mx-g;
	t=mx-t;
	if(mx==0){
		cout<<s;
		return 0;
	}
	if(q<a+c+g+t){
		cout<<"===";
		return 0;
	}
	if(q>a+c+g+t){
		int h;
		h=q-(a+c+g+t);
		if(h%4==0){
			h/=4;
			a+=h;
			c+=h;
			g+=h;
			t+=h;
		}
		else{
		cout<<"===";
		return 0;
		}

	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='?'){
			if (a)
			{
				s[i]='A';
				a--;
				continue;
			}
			if (c)
			{
				s[i]='C';
				c--;
				continue;
			}
			if (g)
			{
				s[i]='G';
				g--;
				continue;
			}
			if (t)
			{
				s[i]='T';
				t--;
				continue;
			}
		}
	}
	cout<<s;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
//------------+++---------------//
#define m404(x) cout << #x << " = " << x << endl
#define _ printf(" ")
#define _s(x) cout<<x<<endl
#define __ printf("\n")
#define in(v)  scanf("%i",&v)
#define out(v) printf("%i",v )
#define llin(v)  scanf("%I64d",&v)
#define llout(v)  printf("%I64d",v)
#define fin(v)  scanf("%f",&v)
#define fout(v)  printf("%f",v)
#define din(v)  scanf("%lf",&v)
#define dout(v)  printf("%lf",v)
typedef long long ll;
//------------+++---------------//
// ll power(ll base,ll exp,ll result=1){
// 	while (exp){if (exp & 1)result *= base;exp >>= 1;base *= base;}
// 	return result;
// }
// bool compare(const pair<ll,ll>&i, const pair<ll,ll>&j)
// {
//     return i.first > j.first;
// }
int n,a,c,g,t,mx;
string s;
int main()
{
	in(n);
	cin>>s;
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='A') a++;
		if(s[i]=='C') c++;
		if(s[i]=='G') g++;
		if(s[i]=='T') t++;
	}
	mx=max(a,max(c,max(g,t)));
	a-=mx;
	c-=mx;
	g-=mx;
	t-=mx;
	if(mx==0){
		cout<<s;
		return 0;
	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='?'){
			if (a)
			{
				s[i]='A';
				a--;
				continue;
			}
			if (c)
			{
				s[i]='C';
				c--;
				continue;
			}
			if (g)
			{
				s[i]='G';
				g--;
				continue;
			}
			if (t)
			{
				s[i]='T';
				t--;
				continue;
			}
		}
	}
	cout<<s;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
//------------+++---------------//
#define m404(x) cout << #x << " = " << x << endl
#define _ printf(" ")
#define _s(x) cout<<x<<endl
#define __ printf("\n")
#define in(v)  scanf("%i",&v)
#define out(v) printf("%i",v )
#define llin(v)  scanf("%I64d",&v)
#define llout(v)  printf("%I64d",v)
#define fin(v)  scanf("%f",&v)
#define fout(v)  printf("%f",v)
#define din(v)  scanf("%lf",&v)
#define dout(v)  printf("%lf",v)
typedef long long ll;
//------------+++---------------//
// ll power(ll base,ll exp,ll result=1){
// 	while (exp){if (exp & 1)result *= base;exp >>= 1;base *= base;}
// 	return result;
// }
// bool compare(const pair<ll,ll>&i, const pair<ll,ll>&j)
// {
//     return i.first > j.first;
// }

int main()
{
	int n,a=0,c=0,g=0,t=0,mx=-1,q=0;
	string s;
	in(n);
	cin>>s;
	if(n%4!=0){
		cout<<"===";
		return 0;
	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='A') a++;
		if(s[i]=='C') c++;
		if(s[i]=='G') g++;
		if(s[i]=='T') t++;
		if(s[i]=='?') q++;
	}
	mx=max(a,max(c,max(g,t)));
	a=mx-a;
	c=mx-c;
	g=mx-g;
	t=mx-t;
	if(q==0){
		cout<<s;
		return 0;
	}
	if(q<a+c+g+t){
		cout<<"===";
		return 0;
	}
	if(q>a+c+g+t){
		int h;
		h=q-(a+c+g+t);
		if(h%4==0){
			h/=4;
			a+=h;
			c+=h;
			g+=h;
			t+=h;
		}
		else{
		cout<<"===";
		return 0;
		}

	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='?'){
			if (a)
			{
				s[i]='A';
				a--;
				q--;
				continue;
			}
			if (c)
			{
				s[i]='C';
				c--;
				q--;
				continue;
			}
			if (g)
			{
				s[i]='G';
				g--;
				q--;
				continue;
			}
			if (t)
			{
				s[i]='T';
				t--;
				q--;
				continue;
			}
		}
	}
	if(q==0)
		cout<<s;
	else
		cout<<"===";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
//------------+++---------------//
#define m404(x) cout << #x << " = " << x << endl
#define _ printf(" ")
#define _s(x) cout<<x<<endl
#define __ printf("\n")
#define in(v)  scanf("%i",&v)
#define out(v) printf("%i",v )
#define llin(v)  scanf("%I64d",&v)
#define llout(v)  printf("%I64d",v)
#define fin(v)  scanf("%f",&v)
#define fout(v)  printf("%f",v)
#define din(v)  scanf("%lf",&v)
#define dout(v)  printf("%lf",v)
typedef long long ll;
//------------+++---------------//
// ll power(ll base,ll exp,ll result=1){
// 	while (exp){if (exp & 1)result *= base;exp >>= 1;base *= base;}
// 	return result;
// }
// bool compare(const pair<ll,ll>&i, const pair<ll,ll>&j)
// {
//     return i.first > j.first;
// }
int n,a,c,g,t,mx,q;
string s;
int main()
{
	in(n);
	cin>>s;
	if(n%4!=0){
		cout<<"===";
		return 0;
	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='A') a++;
		if(s[i]=='C') c++;
		if(s[i]=='G') g++;
		if(s[i]=='T') t++;
		if(s[i]=='?') q++;
	}
	mx=max(a,max(c,max(g,t)));
	a=mx-a;
	c=mx-c;
	g=mx-g;
	t=mx-t;
	if(mx==0){
		cout<<s;
		return 0;
	}
	if(q<a+c+g+t){
		cout<<"===";
		return 0;
	}
	if(q>a+c+g+t){
		int h;
		h=q-(a+c+g+t);
		if(h%4==0){
			h/=4;
			a+=h;
			c+=h;
			g+=h;
			t+=h;
		}
		else{
		cout<<"===";
		return 0;
		}

	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='?'){
			if (a)
			{
				s[i]='A';
				a--;
				q--;
				continue;
			}
			if (c)
			{
				s[i]='C';
				c--;
				q--;
				continue;
			}
			if (g)
			{
				s[i]='G';
				g--;
				q--;
				continue;
			}
			if (t)
			{
				s[i]='T';
				t--;
				q--;
				continue;
			}
		}
	}
	if(q==0)
		cout<<s;
	else
		cout<<"===";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
//------------+++---------------//
#define m404(x) cout << #x << " = " << x << endl
#define _ printf(" ")
#define _s(x) cout<<x<<endl
#define __ printf("\n")
#define in(v)  scanf("%i",&v)
#define out(v) printf("%i",v )
#define llin(v)  scanf("%I64d",&v)
#define llout(v)  printf("%I64d",v)
#define fin(v)  scanf("%f",&v)
#define fout(v)  printf("%f",v)
#define din(v)  scanf("%lf",&v)
#define dout(v)  printf("%lf",v)
typedef long long ll;
//------------+++---------------//
// ll power(ll base,ll exp,ll result=1){
// 	while (exp){if (exp & 1)result *= base;exp >>= 1;base *= base;}
// 	return result;
// }
// bool compare(const pair<ll,ll>&i, const pair<ll,ll>&j)
// {
//     return i.first > j.first;
// }
int n,a,c,g,t,mx,q;
string s;
int main()
{
	in(n);
	cin>>s;
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='A') a++;
		if(s[i]=='C') c++;
		if(s[i]=='G') g++;
		if(s[i]=='T') t++;
		if(s[i]=='?') q++;
	}
	mx=max(a,max(c,max(g,t)));
	a=mx-a;
	c=mx-c;
	g=mx-g;
	t=mx-t;
	if(mx==0){
		cout<<s;
		return 0;
	}
	if(q<a+c+g+t){
		cout<<"===";
		return 0;
	}
	if(q>a+c+g+t){
		int h;
		h=q-(a+c+g+t);
		if(h%4==0){
			h/=4;
			a+=h;
			c+=h;
			g+=h;
			t+=h;
		}
		else{
		cout<<"===";
		return 0;
		}

	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='?'){
			if (a)
			{
				s[i]='A';
				a--;
				continue;
			}
			if (c)
			{
				s[i]='C';
				c--;
				continue;
			}
			if (g)
			{
				s[i]='G';
				g--;
				continue;
			}
			if (t)
			{
				s[i]='T';
				t--;
				continue;
			}
		}
	}
	cout<<s;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
//------------+++---------------//
#define m404(x) cout << #x << " = " << x << endl
#define _ printf(" ")
#define _s(x) cout<<x<<endl
#define __ printf("\n")
#define in(v)  scanf("%i",&v)
#define out(v) printf("%i",v )
#define llin(v)  scanf("%I64d",&v)
#define llout(v)  printf("%I64d",v)
#define fin(v)  scanf("%f",&v)
#define fout(v)  printf("%f",v)
#define din(v)  scanf("%lf",&v)
#define dout(v)  printf("%lf",v)
typedef long long ll;
//------------+++---------------//
// ll power(ll base,ll exp,ll result=1){
// 	while (exp){if (exp & 1)result *= base;exp >>= 1;base *= base;}
// 	return result;
// }
// bool compare(const pair<ll,ll>&i, const pair<ll,ll>&j)
// {
//     return i.first > j.first;
// }
int n,a,c,g,t,mx,q;
string s;
int main()
{
	in(n);
	cin>>s;
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='A') a++;
		if(s[i]=='C') c++;
		if(s[i]=='G') g++;
		if(s[i]=='T') t++;
		if(s[i]=='?') q++;
	}
	mx=max(a,max(c,max(g,t)));
	a=mx-a;
	c=mx-c;
	g=mx-g;
	t=mx-t;
	if(mx==0){
		cout<<s;
		return 0;
	}
	if(q!=a+c+g+t){
		cout<<"===";
		return 0;
	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='?'){
			if (a)
			{
				s[i]='A';
				a--;
				continue;
			}
			if (c)
			{
				s[i]='C';
				c--;
				continue;
			}
			if (g)
			{
				s[i]='G';
				g--;
				continue;
			}
			if (t)
			{
				s[i]='T';
				t--;
				continue;
			}
		}
	}
	cout<<s;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
//------------+++---------------//
#define m404(x) cout << #x << " = " << x << endl
#define _ printf(" ")
#define _s(x) cout<<x<<endl
#define __ printf("\n")
#define in(v)  scanf("%i",&v)
#define out(v) printf("%i",v )
#define llin(v)  scanf("%I64d",&v)
#define llout(v)  printf("%I64d",v)
#define fin(v)  scanf("%f",&v)
#define fout(v)  printf("%f",v)
#define din(v)  scanf("%lf",&v)
#define dout(v)  printf("%lf",v)
typedef long long ll;
//------------+++---------------//
// ll power(ll base,ll exp,ll result=1){
// 	while (exp){if (exp & 1)result *= base;exp >>= 1;base *= base;}
// 	return result;
// }
// bool compare(const pair<ll,ll>&i, const pair<ll,ll>&j)
// {
//     return i.first > j.first;
// }

int main()
{
	int n,a=0,c=0,g=0,t=0,mx=-1,q=0;
	string s;
	in(n);
	cin>>s;
	if(n%4!=0){
		cout<<"===";
		return 0;
	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='A') a++;
		if(s[i]=='C') c++;
		if(s[i]=='G') g++;
		if(s[i]=='T') t++;
		if(s[i]=='?') q++;
	}
	mx=max(a,max(c,max(g,t)));
	a=mx-a;
	c=mx-c;
	g=mx-g;
	t=mx-t;
	if(q==0){
		if(a==c&&c==g&&g==t)
		cout<<s;
	else cout<<"===";
		return 0;
	}
	if(q<a+c+g+t){
		cout<<"===";
		return 0;
	}
	if(q>a+c+g+t){
		int h;
		h=q-(a+c+g+t);
		if(h%4==0){
			h/=4;
			a+=h;
			c+=h;
			g+=h;
			t+=h;
		}
		else{
		cout<<"===";
		return 0;
		}

	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='?'){
			if (a)
			{
				s[i]='A';
				a--;
				q--;
				continue;
			}
			if (c)
			{
				s[i]='C';
				c--;
				q--;
				continue;
			}
			if (g)
			{
				s[i]='G';
				g--;
				q--;
				continue;
			}
			if (t)
			{
				s[i]='T';
				t--;
				q--;
				continue;
			}
		}
	}

		cout<<s;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
//------------+++---------------//
#define m404(x) cout << #x << " = " << x << endl
#define _ printf(" ")
#define _s(x) cout<<x<<endl
#define __ printf("\n")
#define in(v)  scanf("%i",&v)
#define out(v) printf("%i",v )
#define llin(v)  scanf("%I64d",&v)
#define llout(v)  printf("%I64d",v)
#define fin(v)  scanf("%f",&v)
#define fout(v)  printf("%f",v)
#define din(v)  scanf("%lf",&v)
#define dout(v)  printf("%lf",v)
typedef long long ll;
//------------+++---------------//
// ll power(ll base,ll exp,ll result=1){
// 	while (exp){if (exp & 1)result *= base;exp >>= 1;base *= base;}
// 	return result;
// }
// bool compare(const pair<ll,ll>&i, const pair<ll,ll>&j)
// {
//     return i.first > j.first;
// }

int main()
{
	int n,a=0,c=0,g=0,t=0,mx=-1,q=0;
	string s;
	in(n);
	cin>>s;
	if(n%4!=0){
		cout<<"===";
		return 0;
	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='A') a++;
		if(s[i]=='C') c++;
		if(s[i]=='G') g++;
		if(s[i]=='T') t++;
		if(s[i]=='?') q++;
	}
	mx=max(a,max(c,max(g,t)));
	a=mx-a;
	c=mx-c;
	g=mx-g;
	t=mx-t;
	if(q==0){
		cout<<s;
		return 0;
	}
	if(q<a+c+g+t){
		cout<<"===";
		return 0;
	}
	if(q>a+c+g+t){
		int h;
		h=q-(a+c+g+t);
		if(h%4==0){
			h/=4;
			a+=h;
			c+=h;
			g+=h;
			t+=h;
		}
		else{
		cout<<"===";
		return 0;
		}

	}
	for (int i = 0; i < n; ++i)
	{
		if(s[i]=='?'){
			if (a)
			{
				s[i]='A';
				a--;
				q--;
				continue;
			}
			if (c)
			{
				s[i]='C';
				c--;
				q--;
				continue;
			}
			if (g)
			{
				s[i]='G';
				g--;
				q--;
				continue;
			}
			if (t)
			{
				s[i]='T';
				t--;
				q--;
				continue;
			}
		}
	}

		cout<<s;
	return 0;
}