#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=0,c=0,g=0,t=0,mx=0,q=-1;
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(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 <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <sstream>
#include <list>
#include <map>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <iomanip>
#include <cstdlib>
#include <cstdio>
#include <cstring>
using namespace std;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef map<int,int> mii;
typedef map<int,bool> mib;
typedef pair<int,int> pii;
typedef long long int lii;
typedef long long ll;

#define EB emplace_back
#define PB push_back
#define loop(n,i) for(int i=0; i<n; ++i)
#define ALL(c) c.begin(), c.end() // READ AS: "ALL of c"
#define TRAVERSE(c, it) for(auto it = c.begin(); it != c.end(); ++it) // READ AS: "TRAVERSE c using it"
#define PRESENT(c,x) (find(all(c),x) != (c).end())  // for other containers (O(N))
#define PRESENT_SETMAP(c,x) ((c).find(x) != (c).end())   // for sets/maps (O(logN))

// Problem type:
// Online Judge:

int main(){
    // Your move now, bitch!
    int n;
    cin >> n;
    string s;
    cin >> s;
    string notPossible = "===";
    map<char,int> mymap;

    vi questionMarks;
    int pos = 0;
    TRAVERSE(s,it) {
    	++mymap[*it];
    	if(*it == '?') questionMarks.emplace_back(it - s.begin());
    }

    string genomes = "ACGT";
    if(mymap['?'] == n) {
    	if(mymap['?'] % 4 !=0) {
    		cout << notPossible << endl;
    		return 0;
    	}

    	int limit = n / 4;
    	int cnt = 0;
    	int pos = 0;
    	for(int i=0; i<n; i++) {
    		s[i] = genomes[pos];
    		++cnt;
    		if(cnt == limit) {
    			cnt = 0;
    			++pos;
    	 	}
    	}
    	cout << s << endl;
    	return 0;
    }

    int largest = -1;

    TRAVERSE(mymap,it) {
    	if(it->second > largest and it->first != '?') {
    		largest = it->second;
    	}
    }

    // cout << "largest is: " << largest << endl;
    TRAVERSE(genomes,it) {
    	int diff = largest - mymap[*it];
    	if(diff > 0) {
    		// replace some question marks with the genome
    		if(mymap['?'] >= diff) {
    			mymap[*it] = largest;
    			mymap['?'] -= diff;
    			int cnt = 0;
    			while(cnt < diff) {
    				s[questionMarks[pos]] = *it;
    				++pos;
    				++cnt;
    			}
    		}

    		else {
    			cout << notPossible << endl;
    			return 0;
    		}
    	}
    }

    pos = 0;
    if(mymap['?']) {
    	if(mymap['?'] % 4 !=0) {
    		cout << notPossible << endl;
    		return 0;
    	}

    	int limit = mymap['?'] / 4;
    	int cnt = 0;
    	int pos = 0;
    	for(int i=0; i<n; i++) {
    		if(s[i] == '?') {
    			s[i] = genomes[pos];
    			--mymap['?'];
    		    ++cnt;
    			if(cnt == limit) {
    				cnt = 0;
    				++pos;
    	 		}
    		}
    	}
    }

    // cout << "state is: " << s << endl;

    if(mymap['?']) {
    	// cout << "here 2 " << endl;
    	cout << notPossible << endl;
    	return 0;
    }
    // at this stage, all of the genomes will be equal.

    cout << s << endl;
    return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <sstream>
#include <list>
#include <map>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <iomanip>
#include <cstdlib>
#include <cstdio>
#include <cstring>
using namespace std;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef map<int,int> mii;
typedef map<int,bool> mib;
typedef pair<int,int> pii;
typedef long long int lii;
typedef long long ll;

#define EB emplace_back
#define PB push_back
#define loop(n,i) for(int i=0; i<n; ++i)
#define ALL(c) c.begin(), c.end() // READ AS: "ALL of c"
#define TRAVERSE(c, it) for(auto it = c.begin(); it != c.end(); ++it) // READ AS: "TRAVERSE c using it"
#define PRESENT(c,x) (find(all(c),x) != (c).end())  // for other containers (O(N))
#define PRESENT_SETMAP(c,x) ((c).find(x) != (c).end())   // for sets/maps (O(logN))

// Problem type:
// Online Judge:

int main(){
    // Your move now, bitch!
    int n;
    cin >> n;
    string s;
    cin >> s;
    string notPossible = "===";
    map<char,int> mymap;

    vi questionMarks;
    int pos = 0;
    TRAVERSE(s,it) {
    	++mymap[*it];
    	if(*it == '?') questionMarks.emplace_back(it - s.begin());
    }

    int largest = -1;

    TRAVERSE(mymap,it) {
    	if(it->second > largest and it->first != '?') {
    		largest = it->second;
    	}
    }

    // cout << "largest is: " << largest << endl;
    string genomes = "ACGT";
    TRAVERSE(genomes,it) {
    	int diff = largest - mymap[*it];
    	if(diff > 0) {
    		// replace some question marks with the genome
    		if(mymap['?'] >= diff) {
    			mymap[*it] = largest;
    			mymap['?'] -= diff;
    			int cnt = 0;
    			while(cnt < diff and questionMarks.size() > 0) {
    				s[questionMarks[pos]] = *it;
    				++pos;
    				++cnt;
    			}
    		}

    		else {
    			cout << notPossible << endl;
    			return 0;
    		}
    	}
    }

    if(mymap['?']) {
    	cout << notPossible << endl;
    	return 0;
    }
    // cout << "state is: " << s << endl;
    // at this stage, all of the genomes will be equal.

    cout << s << endl;
    return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <sstream>
#include <list>
#include <map>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <iomanip>
#include <cstdlib>
#include <cstdio>
#include <cstring>
using namespace std;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef map<int,int> mii;
typedef map<int,bool> mib;
typedef pair<int,int> pii;
typedef long long int lii;
typedef long long ll;

#define EB emplace_back
#define PB push_back
#define loop(n,i) for(int i=0; i<n; ++i)
#define ALL(c) c.begin(), c.end() // READ AS: "ALL of c"
#define TRAVERSE(c, it) for(auto it = c.begin(); it != c.end(); ++it) // READ AS: "TRAVERSE c using it"
#define PRESENT(c,x) (find(all(c),x) != (c).end())  // for other containers (O(N))
#define PRESENT_SETMAP(c,x) ((c).find(x) != (c).end())   // for sets/maps (O(logN))

// Problem type:
// Online Judge:

int main(){
    // Your move now, bitch!
    int n;
    cin >> n;
    string s;
    cin >> s;
    string notPossible = "===";
    map<char,int> mymap;

    vi questionMarks;
    int pos = 0;
    TRAVERSE(s,it) {
    	++mymap[*it];
    	if(*it == '?') questionMarks.emplace_back(it - s.begin());
    }

    string genomes = "ACGT";
    if(mymap['?'] == n) {
    	if(mymap['?'] % 4 !=0) {
    		cout << notPossible << endl;
    		return 0;
    	}

    	int limit = n / 4;
    	int cnt = 0;
    	int pos = 0;
    	for(int i=0; i<n; i++) {
    		s[i] = genomes[pos];
    		++cnt;
    		if(cnt == limit) {
    			cnt = 0;
    			++pos;
    	 	}
    	}
    	cout << s << endl;
    	return 0;
    }

    int largest = -1;

    TRAVERSE(mymap,it) {
    	if(it->second > largest and it->first != '?') {
    		largest = it->second;
    	}
    }

    // cout << "largest is: " << largest << endl;
    TRAVERSE(genomes,it) {
    	int diff = largest - mymap[*it];
    	if(diff > 0) {
    		// replace some question marks with the genome
    		if(mymap['?'] >= diff) {
    			mymap[*it] = largest;
    			mymap['?'] -= diff;
    			int cnt = 0;
    			while(cnt < diff) {
    				s[questionMarks[pos]] = *it;
    				++pos;
    				++cnt;
    			}
    		}

    		else {
    			cout << "here" << endl;
    			cout << notPossible << endl;
    			return 0;
    		}
    	}
    }

    pos = 0;
    if(mymap['?']) {
    	if(mymap['?'] % 4 !=0) {
    		cout << notPossible << endl;
    		return 0;
    	}

    	int limit = mymap['?'] / 4;
    	int cnt = 0;
    	int pos = 0;
    	for(int i=0; i<n; i++) {
    		if(s[i] == '?') {
    			s[i] = genomes[pos];
    			--mymap['?'];
    		    ++cnt;
    			if(cnt == limit) {
    				cnt = 0;
    				++pos;
    	 		}
    		}
    	}
    }

    // cout << "state is: " << s << endl;

    if(mymap['?']) {
    	// cout << "here 2 " << endl;
    	cout << notPossible << endl;
    	return 0;
    }
    // at this stage, all of the genomes will be equal.

    cout << s << endl;
    return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <sstream>
#include <list>
#include <map>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <iomanip>
#include <cstdlib>
#include <cstdio>
#include <cstring>
using namespace std;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef map<int,int> mii;
typedef map<int,bool> mib;
typedef pair<int,int> pii;
typedef long long int lii;
typedef long long ll;

#define EB emplace_back
#define PB push_back
#define loop(n,i) for(int i=0; i<n; ++i)
#define ALL(c) c.begin(), c.end() // READ AS: "ALL of c"
#define TRAVERSE(c, it) for(auto it = c.begin(); it != c.end(); ++it) // READ AS: "TRAVERSE c using it"
#define PRESENT(c,x) (find(all(c),x) != (c).end())  // for other containers (O(N))
#define PRESENT_SETMAP(c,x) ((c).find(x) != (c).end())   // for sets/maps (O(logN))

// Problem type:
// Online Judge:

int main(){
    // Your move now, bitch!
    int n;
    cin >> n;
    string s;
    cin >> s;
    string notPossible = "===";
    map<char,int> mymap;

    vi questionMarks;
    int pos = 0;
    TRAVERSE(s,it) {
    	++mymap[*it];
    	if(*it == '?') questionMarks.emplace_back(it - s.begin());
    }

    string genomes = "ACGT";
    if(mymap['?'] == n) {
    	if(mymap['?'] % 4 !=0) {
    		cout << notPossible << endl;
    		return 0;
    	}

    	int limit = n / 4;
    	int cnt = 0;
    	int pos = 0;
    	for(int i=0; i<n; i++) {
    		s[i] = genomes[pos];
    		++cnt;
    		if(cnt == limit) {
    			cnt = 0;
    			++pos;
    	 	}
    	}
    	cout << s << endl;
    	return 0;
    }

    int largest = -1;

    TRAVERSE(mymap,it) {
    	if(it->second > largest and it->first != '?') {
    		largest = it->second;
    	}
    }

    // cout << "largest is: " << largest << endl;
    TRAVERSE(genomes,it) {
    	int diff = largest - mymap[*it];
    	if(diff > 0) {
    		// replace some question marks with the genome
    		if(mymap['?'] >= diff) {
    			mymap[*it] = largest;
    			mymap['?'] -= diff;
    			int cnt = 0;
    			while(cnt < diff) {
    				s[questionMarks[pos]] = *it;
    				++pos;
    				++cnt;
    			}
    		}

    		else {
    			cout << notPossible << endl;
    			return 0;
    		}
    	}
    }

    if(mymap['?']) {
    	cout << notPossible << endl;
    	return 0;
    }
    // cout << "state is: " << s << endl;
    // at this stage, all of the genomes will be equal.

    cout << s << endl;
    return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <sstream>
#include <list>
#include <map>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <iomanip>
#include <cstdlib>
#include <cstdio>
#include <cstring>
using namespace std;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef map<int,int> mii;
typedef map<int,bool> mib;
typedef pair<int,int> pii;
typedef long long int lii;
typedef long long ll;

#define EB emplace_back
#define PB push_back
#define loop(n,i) for(int i=0; i<n; ++i)
#define ALL(c) c.begin(), c.end() // READ AS: "ALL of c"
#define TRAVERSE(c, it) for(auto it = c.begin(); it != c.end(); ++it) // READ AS: "TRAVERSE c using it"
#define PRESENT(c,x) (find(all(c),x) != (c).end())  // for other containers (O(N))
#define PRESENT_SETMAP(c,x) ((c).find(x) != (c).end())   // for sets/maps (O(logN))

// Problem type:
// Online Judge:

int main(){
    // Your move now, bitch!
    int n;
    cin >> n;
    string s;
    cin >> s;
    string notPossible = "===";
    map<char,int> mymap;

    vi questionMarks;
    int pos = 0;
    TRAVERSE(s,it) {
    	++mymap[*it];
    	if(*it == '?') questionMarks.emplace_back(it - s.begin());
    }

    int largest = -1;

    TRAVERSE(mymap,it) {
    	if(it->second > largest and it->first != '?') {
    		largest = it->second;
    	}
    }

    // cout << "largest is: " << largest << endl;

    TRAVERSE(mymap,it) {
    	int diff = largest - it->second;
    	if(diff > 0) {
    		// replace some question marks with the genome
    		if(mymap['?'] >= diff) {
    			it->second = largest;
    			mymap['?'] -= diff;
    			int cnt = 0;
    			while(cnt < diff and questionMarks.size() > 0) {
    				s[questionMarks[pos]] = it->first;
    				++pos;
    				++cnt;
    			}
    		}

    		else {
    			cout << notPossible << endl;
    			return 0;
    		}
    	}
    }

    // at this stage, all of the genomes will be equal.

    if(mymap['?'] % 4 != 0) {
    	// cout << "came here" << endl;
    	cout << notPossible << endl;
    	return 0;
    }

    cout << s << endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
map<char , int > p;
int main(){
	int n;
	int a,c,g,t,q;
	a = c =  g = t = q = 0;
	int x,y,z;
	string str;
	cin>>n;
	cin>>str;
	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]=='?'){
			q++;
		}
	}
	if(a>=c && a>=g && a>=t){
		x = a-g;
		y = a-c;
		z = a-t;
		q = q - (x+y+z);
		if(q==0){
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"G";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(g>=a && g>=c && g>=t){
		x = g-a;
		y = g-c;
		z = g-t;
		q = q - (x+y+z);
		if(q==0){
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(c>=a && c>=t && c>=g){
		x = c-a;
		y = c-g;
		z = c-t;
		q = q - (x+y+z);
		if(q==0){
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"G";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(t>=a && t>=c && t>=g){
		x = t-a;
		y = t-c;
		z = t-g;
		q = q - (x+y+z);
		if(q==0){
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"G";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	if(q!=0){
		cout<<"===";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
map<char , int > p;
int main(){
	int n;
	int a,c,g,t,q;
	a = c =  g = t = q = 0;
	int f = 0;
	int x,y,z;
	string str;
	cin>>n;
	cin>>str;
	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]=='?'){
			q++;
		}
	}
	if(a>=c && a>=g && a>=t){
		x = a-g;
		y = a-c;
		z = a-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"G";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(g>=a && g>=c && g>=t){
		x = g-a;
		y = g-c;
		z = g-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(c>=a && c>=t && c>=g){
		x = c-a;
		y = c-g;
		z = c-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"G";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(t>=a && t>=c && t>=g){
		x = t-a;
		y = t-c;
		z = t-g;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"G";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	if(f==0){
		cout<<"===";
	}
	return 0;
}#include<bits/stdc++.h>
using namespace std;
map<char , int > p;
int main(){
	int n;
	int a,c,g,t,q;
	a = c =  g = t = q = 0;
	int f = 0;
	int x,y,z;
	string str;
	cin>>n;
	cin>>str;
	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]=='?'){
			q++;
		}
	}
	if(a>=c && a>=g && a>=t){
		x = a-g;
		y = a-c;
		z = a-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"G";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(g>=a && g>=c && g>=t){
		x = g-a;
		y = g-c;
		z = g-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(c>=a && c>=t && c>=g){
		x = c-a;
		y = c-g;
		z = c-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"G";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(t>=a && t>=c && t>=g){
		x = t-a;
		y = t-c;
		z = t-g;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"G";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	if(f==0){
		cout<<"===";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	int a,c,g,t,q;
	a = c =  g = t = q = 0;
	int f = 0;
	int x,y,z;
	string str;
	cin>>n;
	cin>>str;
	if(n<4) {
		cout<<"===";
		return 0;
	}
	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]=='?'){
			q++;
		}
	}
	if(a>=c && a>=g && a>=t){
		x = a-g;
		y = a-c;
		z = a-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"G";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(g>=a && g>=c && g>=t){
		x = g-a;
		y = g-c;
		z = g-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(c>=a && c>=t && c>=g){
		x = c-a;
		y = c-g;
		z = c-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"G";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(t>=a && t>=c && t>=g){
		x = t-a;
		y = t-c;
		z = t-g;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"G";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	if(f==0){
		cout<<"===";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
map<char , int > p;
int main(){
	int n;
	int c,i;
	string str;
	cin>>n;
	cin>>str;
	for(int i = 0;i<str.length();i++){
		p[str[i]]++;
	}
	int x = n/4;
	if(p['A']>x || p['C']>x || p['G']>x || p['T']>x || n%4!=0){
		cout<<"===";
	}
	else{
		c = x - p['A'];
		i = 0;
		while(true){
			if(c==0) break;
			if(str[i]=='?'){
				str[i] = 'A';
				c--;
			}
			i++;
		}
		c = x - p['C'];
		i = 0;
		while(true){
			if(c==0) break;
			if(str[i]=='?'){
				str[i] = 'C';
				c--;
			}
			i++;
		}
		c = x - p['G'];
		i = 0;
		while(true){
			if(c==0) break;
			if(str[i]=='?'){
				str[i] = 'G';
				c--;
			}
			i++;
		}
		c = x - p['T'];
		i = 0;
		while(true){
			if(c==0) break;
			if(str[i]=='?'){
				str[i] = 'T';
				c--;
			}
			i++;
		}
		cout<<str;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
map<char , int > p;
int main(){
	int n;
	int a,c,g,t,q;
	a = c =  g = t = q = 0;
	int f = 0;
	int x,y,z;
	string str;
	cin>>n;
	cin>>str;
	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]=='?'){
			q++;
		}
	}
	if(a>=c && a>=g && a>=t){
		x = a-g;
		y = a-c;
		z = a-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"G";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(g>=a && g>=c && g>=t){
		x = g-a;
		y = g-c;
		z = g-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(c>=a && c>=t && c>=g){
		x = c-a;
		y = c-g;
		z = c-t;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"G";
						y--;
						continue;
					}
					if(z>0){
						cout<<"T";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	else if(t>=a && t>=c && t>=g){
		x = t-a;
		y = t-c;
		z = t-g;
		q = q - (x+y+z);
		if(q==0){
			f = 1;
			for(int i = 0;i<str.length();i++){
				if(str[i]=='?'){
					if(x>0){
						cout<<"A";
						x--;
						continue;
					}
					if(y>0){
						cout<<"C";
						y--;
						continue;
					}
					if(z>0){
						cout<<"G";
						z--;
						continue;
					}
				}
				else{
					cout<<str[i];
				}
			}
		}
	}
	if(f==0){
		cout<<"===";
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int n;
string a;
int A, G, C, T,t,e;
typedef pair<int, char>pic;
pic v[4];
int main() {
	cin >> n >> a;
	v[0].second = 'A';
	v[1].second = 'G';
	v[2].second = 'C';
	v[3].second = 'T';
	for (int i = 0; i < n; ++i) {
		if (a[i] == 'A')v[0].first++;
		else if (a[i] == 'G')v[1].first++;
		else if (a[i] == 'C')v[2].first++;
		else if (a[i] == 'T')v[3].first++;
		else e++;
	}
	sort(v, v+4);
	if (e!=n && (n % 4 || 4*v[3].first-(v[0].first+v[1].first+v[2].first+v[3].first)!=e)) {
		puts("===");
		return 0;
	}
	int i = 0;
	while (v[0].first != v[3].first) {
		if (a[i] == '?') {
			for (int j = 2; j >= 0; --j) {
				if (v[j].first != v[3].first) {
					v[j].first++;
					a[i] = v[j].second;
					break;
				}
			}
		}
		i++;
	}
	int k = 0;
	if (e==n) {
		for (int i = 0; i < n / 4; ++i) {
			for (int j = 0; j < 4; ++j) {
				a[k++] = v[j].second;
			}
		}
	}
	cout << a << endl;

}


#include <bits/stdc++.h>
using namespace std;
int n;
string a;
int A, G, C, T,t,e;
typedef pair<int, char>pic;
pic v[4];
int main() {
	cin >> n >> a;
	v[0].second = 'A';
	v[1].second = 'G';
	v[2].second = 'C';
	v[3].second = 'T';
	for (int i = 0; i < n; ++i) {
		if (a[i] == 'A')v[0].first++;
		else if (a[i] == 'G')v[1].first++;
		else if (a[i] == 'C')v[2].first++;
		else if (a[i] == 'T')v[3].first++;
		else e++;
	}
	sort(v, v+4);
	if (e!=n && (n % 4 || 4*v[3].first-(v[0].first+v[1].first+v[2].first+v[3].first)!=e)) {
		puts("===");
		return 0;
	}

	int i = 0;
	while (v[0].first != v[3].first) {
		if (a[i] == '?') {
			for (int j = 2; j >= 0; --j) {
				if (v[j].first != v[3].first) {
					v[j].first++;
					a[i] = v[j].second;
					break;
				}
			}
		}
		i++;
	}
	int k = 0;
	if (e==n) {
		if (n % 4) {
			puts("===");
			return 0;
		}
		for (int i = 0; i < n / 4; ++i) {
			for (int j = 0; j < 4; ++j) {
				a[k++] = v[j].second;
			}
		}
	}
	cout << a << endl;

}


#include <bits/stdc++.h>
using namespace std;
typedef pair<int, char>pic;
pic v[4];
int e;
int main() {
	int n;
	string a;
	cin >> n >> a;
	v[0].second = 'A';
	v[1].second = 'G';
	v[2].second = 'C';
	v[3].second = 'T';
	for (int i = 0; i < n; ++i) {
		if (a[i] == 'A')v[0].first++;
		else if (a[i] == 'G')v[1].first++;
		else if (a[i] == 'C')v[2].first++;
		else if (a[i] == 'T')v[3].first++;
		else e++;
	}
	sort(v, v+4);
	if (n % 4 || v[3].first > n / 4) {
		puts("===");
		return 0;
	}
	for (int i = 0; i < n; ++i) {
		if (a[i] == '?') {
			for (int j = 0; j < 4; ++j) {
				if (v[j].first != n / 4) {
					v[j].first++;
					a[i] = v[j].second;
					break;
				}
			}
		}
	}
	cout << a << endl;
}


#include <bits/stdc++.h>
using namespace std;
int n;
string a;
int A, G, C, T,t,e;
typedef pair<int, char>pic;
pic v[4];
int main() {
	cin >> n >> a;
	v[0].second = 'A';
	v[1].second = 'G';
	v[2].second = 'C';
	v[3].second = 'T';
	for (int i = 0; i < n; ++i) {
		if (a[i] == 'A')v[0].first++;
		else if (a[i] == 'G')v[1].first++;
		else if (a[i] == 'C')v[2].first++;
		else if (a[i] == 'T')v[3].first++;
		else e++;
	}
	sort(v, v+4);
	if (n % 4 || 4*v[3].first-(v[0].first+v[1].first+v[2].first+v[3].first)!=e) {
		puts("===");
		return 0;
	}
	int i = 0;
	while (v[0].first != v[3].first) {
		if (a[i] == '?') {
			for (int j = 2; j >= 0; --j) {
				if (v[j].first != v[3].first) {
					v[j].first++;
					a[i] = v[j].second;
					break;
				}
			}
		}
		i++;
	}
	cout << a << endl;

}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string st;
typedef vector<long long > ve;
#define p push_back
#define ma INT_MAX
#define mi INT_MIN
#define in(v) v.begin(),v.end()

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
    ll n,a=0,b=0,c=0,d=0,e=0,sum=0,q;
    cin>>n;
    st s;
    cin>>s;
    if(n%4!=0){cout<<"===";return 0;}
    for(ll i=0;i<s.size();i++)
        {if(s[i]=='?')a++;
        else if(s[i]=='A')b++;
        else if(s[i]=='C')c++;
        else if(s[i]=='G')d++;
        else e++;}
        q=n/4;
      sum=sum+(q-b)+(q-c)+(q-d)+(q-e);
      b=q-b;
      c=q-c;
      d=q-d;
      e=q-e;
      if(sum!=a||(b<0)||(c<0)||(d<0)||(e<0))
        {
            cout<<"===";
            return 0;
        }
      if(sum==0)
      {
          for(ll i=0;i<n;i+=4)
            cout<<"AGCT";
           return 0;
        }
      if(a==0)
        {
            cout<<s;
            return 0;
        }
        for(ll i=0;i<s.size();i++)
            {if(s[i]=='?')
               {if(b>0)
                 {s[i]='A';
                    b--;}
                else if(c>0)
                {s[i]='C';
                    c--;}
                else if(d>0)
                    {s[i]='G';
                        d--;}
                    else if(e>0)
                     {s[i]='T';
                        e--;}}}
    cout<<s;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string st;
typedef vector<long long > ve;
#define p push_back
#define ma INT_MAX
#define mi INT_MIN
#define in(v) v.begin(),v.end()

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
    ll n,a=0,b=0,c=0,d=0,e=0,m,sum=0;
    cin>>n;
    st s;
    cin>>s;
    if(n%4!=0)cout<<"===";
    else
    {for(ll i=0;i<s.size();i++)
        {if(s[i]=='?')a++;
        else if(s[i]=='A')b++;
        else if(s[i]=='C')c++;
        else if(s[i]=='G')d++;
        else e++;}
      m=max(b,(max(c,(max(d,e)))));
      sum=sum+(m-b)+(m-c)+(m-d)+(m-e);
      b=m-b;
      c=m-c;
      d=m-d;
      e=m-e;
      if(sum!=a)
        cout<<"===";
      else
      {if(a==0)
        cout<<s;
       else
        {for(ll i=0;i<s.size();i++)
            {if(s[i]=='?')
               {if(b>0)
                 {s[i]='A';
                    b--;}
                else if(c>0)
                {s[i]='C';
                    c--;}
                else if(d>0)
                    {s[i]='G';
                        d--;}
                    else if(e>0)
                     {s[i]='T';
                        e--;}}}
        cout<<s;}}}
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string st;
typedef vector<long long > ve;
#define p push_back
#define ma INT_MAX
#define mi INT_MIN
#define in(v) v.begin(),v.end()

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
    ll n,a=0,b=0,c=0,d=0,e=0,m,sum=0;
    cin>>n;
    st s;
    cin>>s;
    if(n%4!=0)cout<<"===";
    else
    {for(ll i=0;i<s.size();i++)
        {if(s[i]=='?')a++;
        else if(s[i]=='A')b++;
        else if(s[i]=='C')c++;
        else if(s[i]=='G')d++;
        else e++;}
      m=max(b,(max(c,(max(d,e)))));
      sum=sum+(m-b)+(m-c)+(m-d)+(m-e);
      b=m-b;
      c=m-c;
      d=m-d;
      e=m-e;
      if(sum!=a&&sum!=0)
        cout<<"===";
      if(sum==0)
      {for(ll i=0;i<n;i+=4)
        cout<<"AGCT";}
      else
      {if(a==0)
        cout<<s;
       else
        {
        for(ll i=0;i<s.size();i++)
            {if(s[i]=='?')
               {if(b>0)
                 {s[i]='A';
                    b--;}
                else if(c>0)
                {s[i]='C';
                    c--;}
                else if(d>0)
                    {s[i]='G';
                        d--;}
                    else if(e>0)
                     {s[i]='T';
                        e--;}}}
        cout<<s;}}}
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string st;
typedef vector<long long > ve;
#define p push_back
#define ma INT_MAX
#define mi INT_MIN
#define in(v) v.begin(),v.end()

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
    ll n,a=0,b=0,c=0,d=0,e=0,m,sum=0;
    cin>>n;
    st s;
    cin>>s;
    if(n%4!=0)cout<<"===";
    else
    {for(ll i=0;i<s.size();i++)
        {if(s[i]=='?')a++;
        else if(s[i]=='A')b++;
        else if(s[i]=='C')c++;
        else if(s[i]=='G')d++;
        else e++;}
      m=max(b,(max(c,(max(d,e)))));
      sum=sum+(m-b)+(m-c)+(m-d)+(m-e);
      b=m-b;
      c=m-c;
      d=m-d;
      e=m-e;
      if(sum!=a&&sum!=0)
        {
            cout<<"===";
            return 0;
        }
      if(sum==0)
      {
          for(ll i=0;i<n;i+=4)
            cout<<"AGCT";
           return 0;
        }
      if(a==0)
        {
            cout<<s;
            return 0;
        }
        for(ll i=0;i<s.size();i++)
            {if(s[i]=='?')
               {if(b>0)
                 {s[i]='A';
                    b--;}
                else if(c>0)
                {s[i]='C';
                    c--;}
                else if(d>0)
                    {s[i]='G';
                        d--;}
                    else if(e>0)
                     {s[i]='T';
                        e--;}}}
        cout<<s;}
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string st;
typedef vector<long long > ve;
#define p push_back
#define ma INT_MAX
#define mi INT_MIN
#define in(v) v.begin(),v.end()

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
    ll n,a=0,b=0,c=0,d=0,e=0,sum=0,q;
    cin>>n;
    st s;
    cin>>s;
    if(n%4!=0){cout<<"===";return 0;}
    for(ll i=0;i<s.size();i++)
        {if(s[i]=='?')a++;
        else if(s[i]=='A')b++;
        else if(s[i]=='C')c++;
        else if(s[i]=='G')d++;
        else e++;}
        q=n/4;
      sum=sum+(q-b)+(q-c)+(q-d)+(q-e);
      b=q-b;
      c=q-c;
      d=q-d;
      e=q-e;
      if(sum!=a||(b<0)||(c<0)||(d<0)||(e<0))
        {
            cout<<"===";
            return 0;
        }
      if(sum==0)
      {
          for(ll i=0;i<n;i+=4)
            cout<<"AGCT";
           return 0;
        }
      if(a==0)
        {
            cout<<s;
            return 0;
        }
        for(ll i=0;i<s.size();i++)
            {if(s[i]=='?')
               {if(b>0)
                 {s[i]='A';
                    b--;}
                else if(c>0)
                {s[i]='C';
                    c--;}
                else if(d>0)
                    {s[i]='G';
                        d--;}
                    else if(e>0)
                     {s[i]='T';
                        e--;}}}
        cout<<s;}
    return 0;
}


#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
	int len,i,a=0,g=0,c=0,t=0;
	string s;
	cin>>len>>s;
	for(i=0;i<s.size();i++)
	{
		if(s[i]=='A')
			a++;
		if(s[i]=='G')
                        g++;
		if(s[i]=='C')
                        c++;
		if(s[i]=='T')
                        t++;
	}
	int q=s.size()-(a+g+c+t);
	if(q==0)
		cout<<s;
	else if((s.size()%4)==0 )
	{
		int x=s.size()/4;
		if(x<a || x<c || x<g || x<t)
		{
			cout<<"===";
			return 0;
		}
		a=x-a,g=x-g,c=x-c,t=x-t;
		for(i=0;i<s.size();i++)
		{
			if(s[i]=='?')
			{
				if(a>0)
				{
					s[i]='A';
					a--;
				}
				else if(g>0)
                                {
                                        s[i]='G';
                                        g--;
                                }
				else if(c>0)
                                {
                                        s[i]='C';
                                        c--;
                                }
				else if(t>0)
                                {
                                        s[i]='T';
                                        t--;
                                }
			}
			cout<<s[i];
		}
	}
	else
	{
		cout<<"===";
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
	int len,i,a=0,g=0,c=0,t=0;
	string s;
	cin>>len>>s;
	for(i=0;i<s.size();i++)
	{
		if(s[i]=='A')
			a++;
		if(s[i]=='G')
                        g++;
		if(s[i]=='C')
                        c++;
		if(s[i]=='T')
                        t++;
	}
	int q=s.size()-(a+g+c+t);
	if(q==0)
		cout<<s;
	if((s.size()%4)==0 )
	{
		int x=s.size()/4;
		if(x<a || x<c || x<g || x<t)
		{
			cout<<"===";
			return 0;
		}
		a=x-a,g=x-g,c=x-c,t=x-t;
		for(i=0;i<s.size();i++)
		{
			if(s[i]=='?')
			{
				if(a>0)
				{
					s[i]='A';
					a--;
				}
				else if(g>0)
                                {
                                        s[i]='G';
                                        g--;
                                }
				else if(c>0)
                                {
                                        s[i]='C';
                                        c--;
                                }
				else if(t>0)
                                {
                                        s[i]='T';
                                        t--;
                                }
			}
			cout<<s[i];
		}
	}
	else
	{
		cout<<"===";
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
	int len,i,a=0,g=0,c=0,t=0;
	string s;
	cin>>len>>s;
	for(i=0;i<s.size();i++)
	{
		if(s[i]=='A')
			a++;
		if(s[i]=='G')
                        g++;
		if(s[i]=='C')
                        c++;
		if(s[i]=='T')
                        t++;
	}
	int q=s.size()-(a+g+c+t);
	if(q==0)
		cout<<s;
	else if(q<(s.size()/2) && s.size()%4==0 )
	{
		int x=max(max(a,g),max(c,t));
		a=x-a,g=x-g,c=x-c,t=x-t;
		for(i=0;i<s.size();i++)
		{
			if(s[i]=='?')
			{
				if(a>0)
				{
					s[i]='A';
					a--;
				}
				else if(g>0)
                                {
                                        s[i]='G';
                                        g--;
                                }
				else if(c>0)
                                {
                                        s[i]='C';
                                        c--;
                                }
				else if(t>0)
                                {
                                        s[i]='T';
                                        t--;
                                }
			}
			cout<<s[i];
		}
	}
	else
	{
		cout<<"===";
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
	int len,i,a=0,g=0,c=0,t=0;
	string s;
	cin>>len>>s;
	for(i=0;i<s.size();i++)
	{
		if(s[i]=='A')
			a++;
		if(s[i]=='G')
                        g++;
		if(s[i]=='C')
                        c++;
		if(s[i]=='T')
                        t++;
	}
	int q=s.size()-(a+g+c+t);
	if(q==0)
		cout<<s;
	else if(q<(s.size()/2))
	{
		int x=max(max(a,g),max(c,t));
		a=x-a,g=x-g,c=x-c,t=x-t;
		for(i=0;i<s.size();i++)
		{
			if(s[i]=='?')
			{
				if(a>0)
				{
					s[i]='A';
					a--;
				}
				else if(g>0)
                                {
                                        s[i]='G';
                                        g--;
                                }
				else if(c>0)
                                {
                                        s[i]='C';
                                        c--;
                                }
				else if(t>0)
                                {
                                        s[i]='T';
                                        t--;
                                }
			}
			cout<<s[i];
		}
	}
	else
	{
		cout<<"===";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
   int n,x;
   cin>>n;
   string s;
   cin>>s;
   int count[26]={0};
   int i=0,count1=0,count2=0,count3=0,count4=0;
   while(i<s.length())
   {
     if(s[i]>='A' && s[i]<='Z')
     {
         count[s[i]-'A']++;
     }
     else
     {
         count1++;
     }
     i++;
   }
   int max=count[0];
       for(int i=0;i<26;i++)
       {
         if(count[i]>max)
         {
            max=count[i];
         }
       }
       int sum=0;
     for(int i=0;i<26;i++)
       {
           if(count[i]!=max && count[i]!=0)
           {
             sum+=(max-count[i]);
           }
       }
       if(count1!=sum)
       {
           cout<<"===";
           exit(0);
       }
      for(int i=0;i<s.length();i++)
      {
        if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         else
         {
          s.replace(i,1,"A");
           count2++;
         }
         if(count2==max-1)
         {
             break;
         }
      }
      for(int i=0;i<s.length();i++)
      {
         if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         else
         {
          s.replace(i,1,"T");
           count3++;
         }
         if(count2==max-1)
         {
             break;
         }
      }
      for(int i=0;i<s.length();i++)
      {
           if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         else
         {
          s.replace(i,1,"G");
           count4++;
         }
         if(count2==max-1)
         {
             break;
         }
      }
       for(int i=0;i<s.length();i++)
      {
         if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         else
         {
          s.replace(i,1,"C");
           count3++;
         }
         if(count2==max-1)
         {
             break;
         }
      }
      cout<<s;
       return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
   int n,x;
   cin>>n;
   string s;
   cin>>s;
   int count[26]={0};
   int i=0,count1=0,count2=0,count3=0,count4=0,flag=0;
   int sum1=0,sum2=0,sum3=0,sum4=0;
   while(i<s.length())
   {
     if(s[i]>='A' && s[i]<='Z')
     {
         count[s[i]-'A']++;
     }
     else
     {
         count1++;
     }
     i++;
   }
    for(int i=0;i<26;i++)
       {
         if(count[i]!=0)
         {
             flag=1;
         }
       }
   if(flag==1)
   {
       int max=count[0];
       for(int i=0;i<26;i++)
       {
         if(count[i]>max)
         {
            max=count[i];
         }
       }
       int sum=0;
     for(int i=0;i<26;i++)
       {
           if(count[i]!=max && count[i]!=0)
           {
             sum+=(max-count[i]);
           }
       }
       if(count1!=sum)
       {
           cout<<"===";
           exit(0);
       }
      for(int i=0;i<s.length();i++)
      {
        if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         else
         {
          s.replace(i,1,"A");
           count2++;
         }
         if(count2==max-1)
         {
             break;
         }
      }
      for(int i=0;i<s.length();i++)
      {
         if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         else
         {
          s.replace(i,1,"T");
           count3++;
         }
         if(count2==max-1)
         {
             break;
         }
      }
      for(int i=0;i<s.length();i++)
      {
           if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         else
         {
          s.replace(i,1,"G");
           count4++;
         }
         if(count2==max-1)
         {
             break;
         }
      }
       for(int i=0;i<s.length();i++)
      {
         if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         else
         {
          s.replace(i,1,"C");
           count3++;
         }
         if(count2==max-1)
         {
             break;
         }
      }
   }
   else
    {
    if(count1%4==0)
    {
     for(int i=0;i<s.length();i++)
     {
         s.replace(i,1,"A");
         sum1++;
         if(sum1==count1/4)
         {
             break;
         }
    }
    for(int i=sum1;i<s.length();i++)
     {
         s.replace(i,1,"G");
         sum2++;
         if(sum2==count1/4)
         {
             break;
         }
    }
    for(int i=2*sum1;i<s.length();i++)
     {
         s.replace(i,1,"C");
         sum3++;
         if(sum3==count1/4)
         {
             break;
         }
    }
    for(int i=3*sum1;i<s.length();i++)
     {
         s.replace(i,1,"T");
         sum3++;
         if(sum3==count1/4)
         {
             break;
         }
    }
    }
    else
    {
        cout<<"===";
        exit(0);
    }
    }
      cout<<s;
       return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
   int n,x;
   cin>>n;
   string s;
   cin>>s;
   int count[26]={0};
   int i=0,count1=0,count2=0,count3=0,count4=0,count6=0,count7=0,count8=0,count9=0,count10=0,flag=0;
   int sum1=0,sum2=0,sum3=0,sum4=0,y;
   while(i<s.length())
   {
     if(s[i]>='A' && s[i]<='Z')
     {
         count[s[i]-'A']++;
     }
     else
     {
         count1++;
     }
     i++;
   }
    for(int i=0;i<26;i++)
       {
         if(count[i]!=0)
         {
             flag=1;
         }
       }
   if(flag==1)
   {
       int max=count[0];
       for(int i=0;i<26;i++)
       {
         if(count[i]>max)
         {
            max=count[i];
         }
       }
       int sum=0;
     for(int i=0;i<26;i++)
       {
           if(count[i]!=max && count[i]!=0)
           {
             sum+=(max-count[i]);
           }
       }
      for(int i=0;i<s.length();i++)
      {
        if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         if(count2+count[0]==max)
         {
             break;
         }
         else
         {
          s.replace(i,1,"A");
           count2++;
         }
      }
      for(int i=0;i<s.length();i++)
      {
         if(s[i]==char('A'+max))
        {
            continue;
        }
        if(count3+count[19]==max)
         {
             break;
         }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         else
         {
          s.replace(i,1,"T");
           count3++;
         }
      }
      for(int i=0;i<s.length();i++)
      {
           if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         if(count4+count[6]==max)
         {
             break;
         }
         else
         {
          s.replace(i,1,"G");
           count4++;
         }
      }
       for(int i=0;i<s.length();i++)
      {
         if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
          if(count6+count[2]==max)
         {
             break;
         }
         else
         {
          s.replace(i,1,"C");
           count6++;
         }
      }
      if(s.length()!=4*max)
      {
       y=(n-4*max)/4;
         for(int i=0;i<s.length();i++)
         {
                if(count7==y)
           {
               break;
           }
           if(!(s[i]>='A' && s[i]<='Z'))
              {
                s.replace(i,1,"A");
                count7++;
              }
         }
         for(int i=0;i<s.length();i++)
         {
                if(count8==y)
           {
               break;
           }
           if(!(s[i]>='A' && s[i]<='Z'))
              {
                s.replace(i,1,"G");
                count8++;
              }
         }
         for(int i=0;i<s.length();i++)
         {
                if(count9==y)
           {
               break;
           }
           if(!(s[i]>='A' && s[i]<='Z'))
              {
                s.replace(i,1,"T");
                count9++;
              }
         }
         for(int i=0;i<s.length();i++)
         {
                if(count10==y)
           {
               break;
           }
           if(!(s[i]>='A' && s[i]<='Z'))
              {
                s.replace(i,1,"C");
                count10++;
              }
         }
      }
      int k=0;
      int count5[26]={0};
     while(k<s.length())
   {
     if(s[k]>='A' && s[k]<='Z')
     {
         count5[s[k]-'A']++;
     }
     k++;
   }
   }
   else
    {
    if(count1%4==0)
    {
     for(int i=0;i<s.length();i++)
     {
         s.replace(i,1,"A");
         sum1++;
         if(sum1==count1/4)
         {
             break;
         }
    }
    for(int i=sum1;i<s.length();i++)
     {
         s.replace(i,1,"G");
         sum2++;
         if(sum2==count1/4)
         {
             break;
         }
    }
    for(int i=2*sum1;i<s.length();i++)
     {
         s.replace(i,1,"C");
         sum3++;
         if(sum3==count1/4)
         {
             break;
         }
    }
    for(int i=3*sum1;i<s.length();i++)
     {
         s.replace(i,1,"T");
         sum3++;
         if(sum3==count1/4)
         {
             break;
         }
    }
    }
    else
    {
        cout<<"===";
        exit(0);
    }
    }
      cout<<s;
       return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  string s;
  cin>>s;
  if(n%4!=0)
  {
      cout<<"===";
      exit(0);
  }
  int count[26]={0};
      int i=0;
      while(i<s.length())
      {
        if(s[i]>='A' && s[i]<='Z')
        {
            count[s[i]-'A']++;
        }
        i++;
      }
  int x=n/4;
  if(count[0]>x || count[2]>x || count[6]>x || count[19]>x)
  {
      cout<<"===";
      exit(0);

  }
  else
  {
    for(int i=0;i<s.length();i++)
      {
       if(s[i]=='?')
       {
         if(count[0]==x)
         {
             break;
         }
            s.replace(i,1,"A");
          count[0]++;
       }
      }
       for(int i=0;i<s.length();i++)
      {
       if(s[i]=='?')
       {
         if(count[2]==x)
         {
             break;
         }
            s.replace(i,1,"C");
          count[2]++;
       }
      }
       for(int i=0;i<s.length();i++)
      {
       if(s[i]=='?')
       {
         if(count[6]==x)
         {
             break;
         }
            s.replace(i,1,"G");
            count[6]++;
       }
      }
       for(int i=0;i<s.length();i++)
      {
       if(s[i]=='?')
       {
         if(count[19]==x)
         {
             break;
         }
            s.replace(i,1,"T");
          count[19]++;
       }
      }
  }
      cout<<s;
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
   int n,x;
   cin>>n;
   string s;
   cin>>s;
   cout<<s.length()<<endl;
   int count[26]={0};
   int i=0,count1=0,count2=0,count3=0,count4=0,count6=0,count7=0,count8=0,count9=0,count10=0,flag=0;
   int sum1=0,sum2=0,sum3=0,sum4=0,y;
   while(i<s.length())
   {
     if(s[i]>='A' && s[i]<='Z')
     {
         count[s[i]-'A']++;
     }
     else
     {
         count1++;
     }
     i++;
   }
    for(int i=0;i<26;i++)
       {
         if(count[i]!=0)
         {
             flag=1;
         }
       }
   if(flag==1)
   {
       int max=count[0];
       for(int i=0;i<26;i++)
       {
         if(count[i]>max)
         {
            max=count[i];
         }
       }
       int sum=0;
     for(int i=0;i<26;i++)
       {
           if(count[i]!=max && count[i]!=0)
           {
             sum+=(max-count[i]);
           }
       }
      for(int i=0;i<s.length();i++)
      {
        if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         if(count2+count[0]==max)
         {
             break;
         }
         else
         {
          s.replace(i,1,"A");
           count2++;
         }
      }
      for(int i=0;i<s.length();i++)
      {
         if(s[i]==char('A'+max))
        {
            continue;
        }
        if(count3+count[19]==max)
         {
             break;
         }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         else
         {
          s.replace(i,1,"T");
           count3++;
         }
      }
      for(int i=0;i<s.length();i++)
      {
           if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
         if(count4+count[6]==max)
         {
             break;
         }
         else
         {
          s.replace(i,1,"G");
           count4++;
         }
      }
       for(int i=0;i<s.length();i++)
      {
         if(s[i]==char('A'+max))
        {
            continue;
        }
         if(s[i]>='A' && s[i]<='Z')
         {
          continue;
         }
          if(count6+count[2]==max)
         {
             break;
         }
         else
         {
          s.replace(i,1,"C");
           count6++;
         }
      }
      if(s.length()!=4*max)
      {
       y=(n-4*max)/4;
         for(int i=0;i<s.length();i++)
         {
                if(count7==y)
           {
               break;
           }
           if(!(s[i]>='A' && s[i]<='Z'))
              {
                s.replace(i,1,"A");
                count7++;
              }
         }
         for(int i=0;i<s.length();i++)
         {
                if(count8==y)
           {
               break;
           }
           if(!(s[i]>='A' && s[i]<='Z'))
              {
                s.replace(i,1,"G");
                count8++;
              }
         }
         for(int i=0;i<s.length();i++)
         {
                if(count9==y)
           {
               break;
           }
           if(!(s[i]>='A' && s[i]<='Z'))
              {
                s.replace(i,1,"T");
                count9++;
              }
         }
         for(int i=0;i<s.length();i++)
         {
                if(count10==y)
           {
               break;
           }
           if(!(s[i]>='A' && s[i]<='Z'))
              {
                s.replace(i,1,"C");
                count10++;
              }
         }
      }
   }
   else
    {
    if(count1%4==0)
    {
     for(int i=0;i<s.length();i++)
     {
         s.replace(i,1,"A");
         sum1++;
         if(sum1==count1/4)
         {
             break;
         }
    }
    for(int i=sum1;i<s.length();i++)
     {
         s.replace(i,1,"G");
         sum2++;
         if(sum2==count1/4)
         {
             break;
         }
    }
    for(int i=2*sum1;i<s.length();i++)
     {
         s.replace(i,1,"C");
         sum3++;
         if(sum3==count1/4)
         {
             break;
         }
    }
    for(int i=3*sum1;i<s.length();i++)
     {
         s.replace(i,1,"T");
         sum3++;
         if(sum3==count1/4)
         {
             break;
         }
    }
    }
    else
    {
        cout<<"===";
        exit(0);
    }
    }
      cout<<s;
       return 0;
}


//... copyright @ASHISH JHA ... _/\_******
/*Licensed under the "THE BEER-WARE LICENSE" (Revision 42):
  Ashish_Jha wrote this file. As long as you retain this notice you
  can do whatever you want with this stuff. If we meet some day, and you think
  this stuff is worth it, you can buy me a beer or coffee in return
*/

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define INF 1e18
#define pb push_back
#define pi pair<ll,ll>
#define pii pair<ll,pair<ll,ll>>
#define chal(n) for(ll i=0;i<n;i++)
#define si1(a) scanf("%d",&a)
#define si2(a,b) scanf("%d%d",&a,&b)
#define si3(a,b,c) scanf("%d%d%d",&a,&b,&c)9
#define sl1(a) scanf("%lld",&a)
#define sl2(a,b) scanf("%lld%lld",&a,&b)
#define sl3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mp make_pair
bool IsPowerOfTwo(ll x){ return (x != 0) && ((x & (x - 1)) == 0);}
ll poer(ll a,ll b){ll rs=1; while(b>0) { if(b&1) rs*=a; a*=a; b/=2;} return rs;}
ll mod_poer(ll a,ll b,ll mo){ll rs=1; while(b>0) { if(b&1) rs=(rs*a)%mo; a=(a*a)%mo; b/=2;} return rs%mo;}
ll d,x,y;
void ext_euclid(ll a,ll b){ if(b==0){d=a;x=1;y=0;}else{ext_euclid(b,a%b);ll temp=x;x=y;y=temp-(a/b)*y;}}
ll mod_inverse1(ll a,ll m){ext_euclid(a,m);return (x%m+m)%m;}
ll mod_inverse2(ll a,ll m){return mod_poer(a,m-2,m);}
ll gcd(ll a,ll b){if(b==0) return a; else return gcd(b,a%b);}

// never take ll as return type of find operation in strings
// never take d,x,y as variables

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

   ll n;
   cin>>n;
   string str;
   cin>>str;
   ll val[4];
   memset(val,0,sizeof(val));
   vector<ll> v;
   ll co=0,pos=0;
   chal(str.size())
   {
       if(str[i]=='A')
        val[0]++;
       else if(str[i]=='G')
        val[1]++;
       else if(str[i]=='C')
        val[2]++;
       else if(str[i]=='T')
        val[3]++;
       else
       {
           co++;
           v.pb(i);
       }
   }
   if(co==0)
   {
       if(val[0]==val[1] && val[1]==val[2] && val[2]==val[3])
        cout<<str<<endl;
       else
        cout<<"==="<<endl;
   }
   else
   {
       ll re=*max_element(val,val+4);
       //cout<<"re h "<<re<<endl;
       chal(4)
       {
           //cout<<val[i]<<endl;
           while(val[i]<re)
           {
               if(i==0)
               {
                   val[i]++;
                   str[v[pos]]='A';
                   pos++;
                   co--;
               }
               else if(i==1)
               {
                   val[i]++;
                   str[v[pos]]='G';
                   pos++;
                   co--;
               }
               else if(i==2)
               {
                   val[i]++;
                   str[v[pos]]='C';
                   pos++;
                   co--;
               }
               else if(i==3)
               {
                   val[i]++;
                  str[v[pos]]='T';
                   pos++;
                   co--;
               }
               if(co==0)
               {
                   if(val[0]==val[1] && val[1]==val[2] && val[2]==val[3])
                      {
                          cout<<str<<endl;
                          return 0;
                      }
                      else
                      {
                          cout<<"==="<<endl;
                          return 0;
                      }
               }
           }
       }
       if(co%4==0)
       {
           ll gh=co/4;
           ll temp=0,idx=0;
           while(temp<=gh && idx<4)
           {
               if(idx==0)
               {
                  str[v[pos]]='A';
                   temp++;
                   pos++;
               }
               else if(idx==1)
               {
                   str[v[pos]]='G';
                   temp++;
                   pos++;
               }
               else if(idx==2)
               {
                   str[v[pos]]='C';
                   temp++;
                   pos++;
               }
               else if(idx==3)
               {
                   str[v[pos]]='T';
                   temp++;
                   pos++;
               }
               if(temp==gh)
               {
                   temp=0;
                   idx++;
               }
           }
           cout<<str<<endl;
           return 0;
       }
       else
       {
           cout<<"==="<<endl;
           return 0;
       }
   }
}


//... copyright @ASHISH JHA ... _/\_******
/*Licensed under the "THE BEER-WARE LICENSE" (Revision 42):
  Ashish_Jha wrote this file. As long as you retain this notice you
  can do whatever you want with this stuff. If we meet some day, and you think
  this stuff is worth it, you can buy me a beer or coffee in return
*/

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define INF 1e18
#define pb push_back
#define pi pair<ll,ll>
#define pii pair<ll,pair<ll,ll>>
#define chal(n) for(ll i=0;i<n;i++)
#define si1(a) scanf("%d",&a)
#define si2(a,b) scanf("%d%d",&a,&b)
#define si3(a,b,c) scanf("%d%d%d",&a,&b,&c)9
#define sl1(a) scanf("%lld",&a)
#define sl2(a,b) scanf("%lld%lld",&a,&b)
#define sl3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mp make_pair
bool IsPowerOfTwo(ll x){ return (x != 0) && ((x & (x - 1)) == 0);}
ll poer(ll a,ll b){ll rs=1; while(b>0) { if(b&1) rs*=a; a*=a; b/=2;} return rs;}
ll mod_poer(ll a,ll b,ll mo){ll rs=1; while(b>0) { if(b&1) rs=(rs*a)%mo; a=(a*a)%mo; b/=2;} return rs%mo;}
ll d,x,y;
void ext_euclid(ll a,ll b){ if(b==0){d=a;x=1;y=0;}else{ext_euclid(b,a%b);ll temp=x;x=y;y=temp-(a/b)*y;}}
ll mod_inverse1(ll a,ll m){ext_euclid(a,m);return (x%m+m)%m;}
ll mod_inverse2(ll a,ll m){return mod_poer(a,m-2,m);}
ll gcd(ll a,ll b){if(b==0) return a; else return gcd(b,a%b);}

// never take ll as return type of find operation in strings
// never take d,x,y as variables
ll n;
string str;
vector<ll> v;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

   cin>>n;
   cin>>str;
   ll val[4],co=0;
   memset(val,0,sizeof(val));
   chal(str.size())
   {
       if(str[i]=='A')
        val[0]++;
       else if(str[i]=='G')
        val[1]++;
       else if(str[i]=='C')
        val[2]++;
       else if(str[i]=='T')
        val[3]++;
       else
        {
            co++;
            v.pb(i);
        }
   }
   //cout<<co<<endl;
   ll pos=0;
   if(co==0)
   {
       if(val[0]==val[1] && val[1]==val[2] && val[2]==val[3])
        cout<<str<<endl;
       else
        cout<<"==="<<endl;
   }
   else
   {
       ll re=*max_element(val,val+4),vc=0;
       //cout<<re<<endl;
       while(co>0)
       {
           bool flg=false;
           chal(4)
           {
               if(val[i]<re && co>0)
               {
                   flg=true;
                   val[i]++;
                   co--;
                   if(i==0)
                   {
                       str[v[pos]]='A';
                       pos++;
                   }
                   else if(i==1)
                   {
                       str[v[pos]]='G';
                       pos++;
                   }
                   else if(i==2)
                   {
                       str[v[pos]]='C';
                       pos++;
                   }
                   else
                   {
                       str[v[pos]]='T';
                       pos++;
                   }
               }
               if(val[0]==val[1] && val[1]==val[2] && val[2]==val[3])
               {
                   vc=-1;
                   break;
               }
               if(co<0)
               {
                   cout<<"==="<<endl;
                   return 0;
               }
           }
           if(vc==-1)
           {
               if(co%4==0)
               {
                   ll re=co/4;
                   ll temp=0,po=0;
                   for(ll i=pos;i<v.size();++i)
                   {
                       if(po==0)
                       str[i]='A';
                       else if(po==1)
                        str[i]=='G';
                       else if(po==2)
                        str[i]=='C';
                       else
                        str[i]='T';
                       temp++;
                       if(temp==re)
                        po++;
                   }
                   cout<<str<<endl;
                   return 0;
               }
               else
                cout<<"==="<<endl;
                return 0;
           }
           if(!flg && co>0)
           {
               cout<<"==="<<endl;
               return 0;
           }
       }
       if(val[0]==val[1] && val[1]==val[2] && val[2]==val[3])
        cout<<str<<endl;
       else
        cout<<"==="<<endl;
   }
   return 0;
}


//... copyright @ASHISH JHA ... _/\_******
/*Licensed under the "THE BEER-WARE LICENSE" (Revision 42):
  Ashish_Jha wrote this file. As long as you retain this notice you
  can do whatever you want with this stuff. If we meet some day, and you think
  this stuff is worth it, you can buy me a beer or coffee in return
*/

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define INF 1e18
#define pb push_back
#define pi pair<ll,ll>
#define pii pair<ll,pair<ll,ll>>
#define chal(n) for(ll i=0;i<n;i++)
#define si1(a) scanf("%d",&a)
#define si2(a,b) scanf("%d%d",&a,&b)
#define si3(a,b,c) scanf("%d%d%d",&a,&b,&c)9
#define sl1(a) scanf("%lld",&a)
#define sl2(a,b) scanf("%lld%lld",&a,&b)
#define sl3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mp make_pair
bool IsPowerOfTwo(ll x){ return (x != 0) && ((x & (x - 1)) == 0);}
ll poer(ll a,ll b){ll rs=1; while(b>0) { if(b&1) rs*=a; a*=a; b/=2;} return rs;}
ll mod_poer(ll a,ll b,ll mo){ll rs=1; while(b>0) { if(b&1) rs=(rs*a)%mo; a=(a*a)%mo; b/=2;} return rs%mo;}
ll d,x,y;
void ext_euclid(ll a,ll b){ if(b==0){d=a;x=1;y=0;}else{ext_euclid(b,a%b);ll temp=x;x=y;y=temp-(a/b)*y;}}
ll mod_inverse1(ll a,ll m){ext_euclid(a,m);return (x%m+m)%m;}
ll mod_inverse2(ll a,ll m){return mod_poer(a,m-2,m);}
ll gcd(ll a,ll b){if(b==0) return a; else return gcd(b,a%b);}

// never take ll as return type of find operation in strings
// never take d,x,y as variables
ll n;
string str;
vector<ll> v;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

   cin>>n;
   cin>>str;
   ll val[4],co=0;
   memset(val,0,sizeof(val));
   chal(str.size())
   {
       if(str[i]=='A')
        val[0]++;
       else if(str[i]=='G')
        val[1]++;
       else if(str[i]=='C')
        val[2]++;
       else if(str[i]=='T')
        val[3]++;
       else
        {
            co++;
            v.pb(i);
        }
   }
   //cout<<co<<endl;
   ll pos=0;
   if(co==0)
   {
       if(val[0]==val[1] && val[1]==val[2] && val[2]==val[3])
        cout<<str<<endl;
       else
        cout<<"==="<<endl;
   }
   else
   {
       ll re=*max_element(val,val+4);
       //cout<<re<<endl;
       while(co>0)
       {
           bool flg=false;
           chal(4)
           {
               if(val[i]<re)
               {
                   flg=true;
                   val[i]++;
                   co--;
                   if(i==0)
                   {
                       str[v[pos]]='A';
                       pos++;
                   }
                   else if(i==1)
                   {
                       str[v[pos]]='G';
                       pos++;
                   }
                   else if(i==2)
                   {
                       str[v[pos]]='C';
                       pos++;
                   }
                   else
                   {
                       str[v[pos]]='T';
                       pos++;
                   }
               }
               if(co<=0)
               {
                   cout<<"==="<<endl;
                   return 0;
               }
           }
           if(!flg && co>0)
           {
               cout<<"==="<<endl;
               return 0;
           }
       }
       if(val[0]==val[1] && val[1]==val[2] && val[2]==val[3])
        cout<<str<<endl;
       else
        cout<<"==="<<endl;
   }
   return 0;
}


//... copyright @ASHISH JHA ... _/\_******
/*Licensed under the "THE BEER-WARE LICENSE" (Revision 42):
  Ashish_Jha wrote this file. As long as you retain this notice you
  can do whatever you want with this stuff. If we meet some day, and you think
  this stuff is worth it, you can buy me a beer or coffee in return
*/

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define INF 1e18
#define pb push_back
#define pi pair<ll,ll>
#define pii pair<ll,pair<ll,ll>>
#define chal(n) for(ll i=0;i<n;i++)
#define si1(a) scanf("%d",&a)
#define si2(a,b) scanf("%d%d",&a,&b)
#define si3(a,b,c) scanf("%d%d%d",&a,&b,&c)9
#define sl1(a) scanf("%lld",&a)
#define sl2(a,b) scanf("%lld%lld",&a,&b)
#define sl3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mp make_pair
bool IsPowerOfTwo(ll x){ return (x != 0) && ((x & (x - 1)) == 0);}
ll poer(ll a,ll b){ll rs=1; while(b>0) { if(b&1) rs*=a; a*=a; b/=2;} return rs;}
ll mod_poer(ll a,ll b,ll mo){ll rs=1; while(b>0) { if(b&1) rs=(rs*a)%mo; a=(a*a)%mo; b/=2;} return rs%mo;}
ll d,x,y;
void ext_euclid(ll a,ll b){ if(b==0){d=a;x=1;y=0;}else{ext_euclid(b,a%b);ll temp=x;x=y;y=temp-(a/b)*y;}}
ll mod_inverse1(ll a,ll m){ext_euclid(a,m);return (x%m+m)%m;}
ll mod_inverse2(ll a,ll m){return mod_poer(a,m-2,m);}
ll gcd(ll a,ll b){if(b==0) return a; else return gcd(b,a%b);}

// never take ll as return type of find operation in strings
// never take d,x,y as variables
ll n;
string inp;
vector<ll> v;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

cin>>n>>inp;
if(n%4!=0){
        cout<<"==="<<endl;
return 0;
}
ll a=0,c=0,g=0,t=0;
for(int i=0;i<n;i++)
{
if(inp[i]=='A')a++;
if(inp[i]=='C')c++;
if(inp[i]=='G')g++;
if(inp[i]=='T')t++;
}
if(4*a>n||4*c>n||4*g>n||4*t>n){cout<<"==="<<endl;return 0;}
for(int i=0;i<n;i++)
{
if(inp[i]=='?')
{
    if(4*(a+1)<=n)inp[i]='A',a++;
    else if(4*(c+1)<=n)inp[i]='C',c++;
    else if(4*(g+1)<=n)inp[i]='G',g++;
    else if(4*(t+1)<=n)inp[i]='T',t++;
}
}
cout<<inp<<endl;
return 0;
}


//... copyright @ASHISH JHA ... _/\_******
/*Licensed under the "THE BEER-WARE LICENSE" (Revision 42):
  Ashish_Jha wrote this file. As long as you retain this notice you
  can do whatever you want with this stuff. If we meet some day, and you think
  this stuff is worth it, you can buy me a beer or coffee in return
*/

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define INF 1e18
#define pb push_back
#define pi pair<ll,ll>
#define pii pair<ll,pair<ll,ll>>
#define chal(n) for(ll i=0;i<n;i++)
#define si1(a) scanf("%d",&a)
#define si2(a,b) scanf("%d%d",&a,&b)
#define si3(a,b,c) scanf("%d%d%d",&a,&b,&c)9
#define sl1(a) scanf("%lld",&a)
#define sl2(a,b) scanf("%lld%lld",&a,&b)
#define sl3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mp make_pair
bool IsPowerOfTwo(ll x){ return (x != 0) && ((x & (x - 1)) == 0);}
ll poer(ll a,ll b){ll rs=1; while(b>0) { if(b&1) rs*=a; a*=a; b/=2;} return rs;}
ll mod_poer(ll a,ll b,ll mo){ll rs=1; while(b>0) { if(b&1) rs=(rs*a)%mo; a=(a*a)%mo; b/=2;} return rs%mo;}
ll d,x,y;
void ext_euclid(ll a,ll b){ if(b==0){d=a;x=1;y=0;}else{ext_euclid(b,a%b);ll temp=x;x=y;y=temp-(a/b)*y;}}
ll mod_inverse1(ll a,ll m){ext_euclid(a,m);return (x%m+m)%m;}
ll mod_inverse2(ll a,ll m){return mod_poer(a,m-2,m);}
ll gcd(ll a,ll b){if(b==0) return a; else return gcd(b,a%b);}

// never take ll as return type of find operation in strings
// never take d,x,y as variables
ll n;
string str;
vector<ll> v;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

   cin>>n;
   cin>>str;
   ll val[4],co=0;
   memset(val,0,sizeof(val));
   chal(str.size())
   {
       if(str[i]=='A')
        val[0]++;
       else if(str[i]=='G')
        val[1]++;
       else if(str[i]=='C')
        val[2]++;
       else if(str[i]=='T')
        val[3]++;
       else
        {
            co++;
            v.pb(i);
        }
   }
   //cout<<co<<endl;
   ll pos=0;
   if(co==0)
   {
       if(val[0]==val[1] && val[1]==val[2] && val[2]==val[3])
        cout<<str<<endl;
       else
        cout<<"==="<<endl;
   }
   else
   {
       ll re=*max_element(val,val+4);
       //cout<<re<<endl;
       while(co>0)
       {
           bool flg=false;
           chal(4)
           {
               if(val[i]<re && co>0)
               {
                   flg=true;
                   val[i]++;
                   co--;
                   if(i==0)
                   {
                       str[v[pos]]='A';
                       pos++;
                   }
                   else if(i==1)
                   {
                       str[v[pos]]='G';
                       pos++;
                   }
                   else if(i==2)
                   {
                       str[v[pos]]='C';
                       pos++;
                   }
                   else
                   {
                       str[v[pos]]='T';
                       pos++;
                   }
               }
               if(co<0)
               {
                   cout<<"==="<<endl;
                   return 0;
               }
           }
           if(!flg && co>0)
           {
               cout<<"==="<<endl;
               return 0;
           }
       }
       if(val[0]==val[1] && val[1]==val[2] && val[2]==val[3])
        cout<<str<<endl;
       else
        cout<<"==="<<endl;
   }
   return 0;
}


#include<bits/stdc++.h>
using namespace std;
char s[300];
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
		cin>>s[i];
	int a=0,g=0,c=0,t=0;
	for(int i=0;i<n;i++)
	{
		if(s[i]=='A')
			a++;
		if(s[i]=='G')
			g++;
		if(s[i]=='C')
			c++;
		if(s[i]=='T')
			t++;
	}
	int x=max(a,max(g,max(c,t)));
	a=x-a;
	g=x-g;
	c=x-c;
	t=x-t;
	int cnt=0;
	for(int i=0;i<n;i++)
		if(s[i]=='?')
			cnt++;
	if(cnt%(a+g+c+t)!=0)
	{
		cout<<"==="<<endl;
		return 0;
	}
	for(int i=0;i<n;i++)
	{
		if(s[i]!='?')
			putchar(s[i]);
		else
		{
			if(a)
			{
				cout<<"A";
				a--;
			}
			else
				if(g)
				{
					cout<<"G";
					g--;
				}
				else
					if(c)
					{
						cout<<"C";
						c--;
					}
					else
						if(t)
						{
							cout<<"T";
							t--;
						}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int m=0,n;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		int j=i,s=0;
		for(int k=2;k<=j;k++)
			if(j%k==0)
			{
				s++;
				while(j%k==0)
					j=j/k;
			}
		if(s==2)
			m++;
	}
	cout<<m;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
char s[300];
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
		cin>>s[i];
	int a=0,g=0,c=0,t=0;
	for(int i=0;i<n;i++)
	{
		if(s[i]=='A')
			a++;
		if(s[i]=='G')
			g++;
		if(s[i]=='C')
			c++;
		if(s[i]=='T')
			t++;
	}
	int x=max(a,max(g,max(c,t)));
	a=x-a;
	g=x-g;
	c=x-c;
	t=x-t;
	for(int i=0;i<n;i++)
	{
		if(s[i]!='?')
			putchar(s[i]);
		else
		{
			if(a)
			{
				cout<<"A";
				a--;
			}
			else
				if(g)
				{
					cout<<"G";
					g--;
				}
				else
					if(c)
					{
						cout<<"C";
						c--;
					}
					else
						if(t)
						{
							cout<<"T";
							t--;
						}
		}
	}
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main(){
	ios::sync_with_stdio ( false );
	cin.tie ( 0 );

	int n, a, t, g, c;
	string in, ans;
	cin >> n >> in;
	if ( n % 4 )
		cout << "===";
	else{
		a = t = g = c = 0;
		n /= 4;
		for ( auto i: in )
			if ( i == 'A' )
				a++;
			else if ( i == 'T' )
				t++;
			else if ( i == 'G' )
				g++;
			else if ( i == 'C' )
				c++;
		if ( a + t + g + c == n )
			ans = in;
		else{
			a -= n, t -= n, g -= n, c -= n;
			for ( auto i: in ){
				if ( i != '?' )
					ans += i;
				else{
					if ( a < 0 )
						ans += 'A', a++;
					else if ( c < 0 )
						ans += 'C', c++;
					else if ( g < 0 )
						ans += 'G', g++;
					else
						ans += 'T', t++;
				}
			}
		}

		cout << ans;
	}

	cout << '\n';
}


#include<bits/stdc++.h>

using namespace std;

int main(){
	ios::sync_with_stdio ( false );
	cin.tie ( 0 );

	int n, a, t, g, c;
	string in, ans;
	cin >> n >> in;
	if ( n % 4 )
		ans = "===";
	else{
		a = t = g = c = 0;
		n /= 4;
		for ( auto i: in )
			if ( i == 'A' )
				a++;
			else if ( i == 'T' )
				t++;
			else if ( i == 'G' )
				g++;
			else if ( i == 'C' )
				c++;
		a -= n, t -= n, g -= n, c -= n;
		if ( a > 0 || t > 0 || c > 0 || g > 0 )
				ans = "===";
		else if ( a + t + g + c == n * 4 )
			ans = in;
		else
			for ( auto i: in )
				if ( i != '?' )
					ans += i;
				else{
					if ( a < 0 )
						ans += 'A', a++;
					else if ( c < 0 )
						ans += 'C', c++;
					else if ( g < 0 )
						ans += 'G', g++;
					else if ( t < 0 )
						ans += 'T', t++;
				}
	}

	cout << ans << '\n';
}


#include<bits/stdc++.h>

using namespace std;

int main(){
	ios::sync_with_stdio ( false );
	cin.tie ( 0 );

	int n, a, t, g, c;
	string in, ans;
	cin >> n >> in;
	if ( n % 4 )
		ans = "===";
	else{
		a = t = g = c = 0;
		n /= 4;
		for ( auto i: in )
			if ( i == 'A' )
				a++;
			else if ( i == 'T' )
				t++;
			else if ( i == 'G' )
				g++;
			else if ( i == 'C' )
				c++;
		if ( a + t + g + c == n )
			ans = in;
		else{
			a -= n, t -= n, g -= n, c -= n;
			if ( a > 0 || t > 0 || c > 0 || g > 0 )
				ans = "===";
			else
				for ( auto i: in )
					if ( i != '?' )
						ans += i;
					else{
						if ( a < 0 )
							ans += 'A', a++;
						else if ( c < 0 )
							ans += 'C', c++;
						else if ( g < 0 )
							ans += 'G', g++;
						else
							ans += 'T', t++;
					}
		}
	}

	cout << ans << '\n';
}


#include<bits/stdc++.h>

using namespace std;

int main(){
	ios::sync_with_stdio ( false );
	cin.tie ( 0 );

	int n, a, t, g, c;
	string in, ans;
	cin >> n >> in;
	if ( n % 4 )
		cout << "===";
	else{
		a = t = g = c = 0;
		n /= 4;
		// cout << n << '\n';
		for ( auto i: in )
			if ( i == 'A' )
				a++;
			else if ( i == 'T' )
				t++;
			else if ( i == 'G' )
				g++;
			else if ( i == 'C' )
				c++;
		if ( a + t + g + c == n )
			ans = in;
		else{
			a = n - a, t = n - t, g = n - g, c = n - c;
			for ( auto i: in ){
				if ( i != '?' )
					ans += i;
				else{
					if ( a )
						ans += 'A', a--;
					else if ( t )
						ans += 'T', t--;
					else if ( g )
						ans += 'G', g--;
					else
						ans += 'C', c--;
				}
				// printf ( "a: %d t: %d g: %d c: %d\n", a, t, g, c );
			}
		}

		cout << ans;
	}

	cout << '\n';
}


#include<bits/stdc++.h>

using namespace std;

int main(){
	ios::sync_with_stdio ( false );
	cin.tie ( 0 );

	int n, a, t, g, c;
	string in, ans;
	cin >> n >> in;
	if ( n % 4 )
		ans = "===";
	else{
		a = t = g = c = 0;
		n /= 4;
		for ( auto i: in )
			if ( i == 'A' )
				a++;
			else if ( i == 'T' )
				t++;
			else if ( i == 'G' )
				g++;
			else if ( i == 'C' )
				c++;
		if ( a + t + g + c == n * 4 )
			ans = in;
		else{
			a -= n, t -= n, g -= n, c -= n;
			if ( a > 0 || t > 0 || c > 0 || g > 0 )
				ans = "===";
			else
				for ( auto i: in )
					if ( i != '?' )
						ans += i;
					else{
						if ( a < 0 )
							ans += 'A', a++;
						else if ( c < 0 )
							ans += 'C', c++;
						else if ( g < 0 )
							ans += 'G', g++;
						else
							ans += 'T', t++;
					}
		}
	}

	cout << ans << '\n';
}


#include<bits/stdc++.h>

using namespace std;

int main(){
	ios::sync_with_stdio ( false );
	cin.tie ( 0 );

	int n, a, t, g, c;
	string in, ans;
	cin >> n >> in;
	if ( n % 4 )
		ans = "===";
	else{
		a = t = g = c = 0;
		n /= 4;
		for ( auto i: in )
			if ( i == 'A' )
				a++;
			else if ( i == 'T' )
				t++;
			else if ( i == 'G' )
				g++;
			else if ( i == 'C' )
				c++;
		if ( a + t + g + c == n * 4 )
			ans = in;
		else{
			a -= n, t -= n, g -= n, c -= n;
			if ( a > 0 || t > 0 || c > 0 || g > 0 )
				ans = "===";
			else
				for ( auto i: in )
					if ( i != '?' )
						ans += i;
					else{
						if ( a < 0 )
							ans += 'A', a++;
						else if ( c < 0 )
							ans += 'C', c++;
						else if ( g < 0 )
							ans += 'G', g++;
						else if ( t < 0 )
							ans += 'T', t++;
					}
		}
	}

	cout << ans << '\n';
}


#include <bits/stdc++.h>
#define MX 200000
#define M 1e18+7
#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define LL long long int
#define f first
#define s second
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++))
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SQRT 316
#define MAXN 1000
#define MAXM 1000
using namespace std;
int main(){
    string s;
int ca=0,ct=0,cg=0,cc=0,qq=0;
cin>>n>>s;
for(int i=0;i<s.length();i++){
    if(s[i]=='A'){
        ca++;
    }
    else if(s[i]=='T'){
        ct++;
    }
    else if(s[i]=='G'){
        cg++;
    }
    else if(s[i]=='C'){
        cc++;
    }
    else if(s[i]=='?'){
        qq++;
    }
}
if(qq==s.length()){
    if(qq%4!=0){
        cout<<"===\n";
    }
    else{   int i=0;
            while(i<s.length()){
                s[i]='A';
                s[i+1]='T';
                s[i+2]='G';
                s[i+3]='C';
                i+=4;
        }
        cout<<s<<'\n';
    }
}
else{
int q=max(ca,max(ct,max(cg,cc)));
ca=q-ca;
ct=q-ct;
cg=q-cg;
cc=q-cc;
if(ca+ct+cg+cc!=qq){
    cout<<"===\n";
}
else{
    for(int i=0;i<s.length();i++){
       if(s[i]=='?'){
        if(ca>0){
            s[i]='A';
            ca--;
        }
        else if(ct>0){
            s[i]='T';
            ct--;
        }
        else if(cg>0){
            s[i]='G';
            cg--;
        }
        else if(cc>0){
            s[i]='C';
            cc--;
        }
    }
}
    cout<<s<<'\n';
}
}
return 0;
}


#include <bits/stdc++.h>
#define MX 200000
#define M 1e18+7
#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define LL long long int
#define f first
#define s second
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++))
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SQRT 316
#define MAXN 1000
#define MAXM 1000
using namespace std;
int main(){
    string s;
int ca=0,ct=0,cg=0,cc=0,qq=0,n;
cin>>n>>s;
for(int i=0;i<s.length();i++){
    if(s[i]=='A'){
        ca++;
    }
    else if(s[i]=='T'){
        ct++;
    }
    else if(s[i]=='G'){
        cg++;
    }
    else if(s[i]=='C'){
        cc++;
    }
    else if(s[i]=='?'){
        qq++;
    }
}
if(qq==s.length()){
    if(qq%4!=0){
        cout<<"===\n";
    }
    else{   int i=0;
            while(i<s.length()){
                s[i]='A';
                s[i+1]='T';
                s[i+2]='G';
                s[i+3]='C';
                i+=4;
        }
        cout<<s<<'\n';
    }
}
else{
int q=max(ca,max(ct,max(cg,cc)));
ca=q-ca;
ct=q-ct;
cg=q-cg;
cc=q-cc;
if(ca+ct+cg+cc!=qq){
    cout<<"===\n";
}
else{
    for(int i=0;i<s.length();i++){
       if(s[i]=='?'){
        if(ca>0){
            s[i]='A';
            ca--;
        }
        else if(ct>0){
            s[i]='T';
            ct--;
        }
        else if(cg>0){
            s[i]='G';
            cg--;
        }
        else if(cc>0){
            s[i]='C';
            cc--;
        }
    }
}
    cout<<s<<'\n';
}
}
return 0;
}


#include <bits/stdc++.h>
#define MX 200000
#define M 1e18+7
#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define LL long long int
#define f first
#define s second
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++))
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SQRT 316
#define MAXN 1000
#define MAXM 1000
using namespace std;
int main(){
    string s;
int ca=0,ct=0,cg=0,cc=0,qq=0;
cin>>n>>s;
for(int i=0;i<s.length();i++){
    if(s[i]=='A'){
        ca++;
    }
    else if(s[i]=='T'){
        ct++;
    }
    else if(s[i]=='G'){
        cg++;
    }
    else if(s[i]=='C'){
        cc++;
    }
    else if(s[i]=='?'){
        qq++;
    }
}
int q=max(ca,max(ct,max(cg,cc)));
ca=q-ca;
ct=q-ct;
cg=q-cg;
cc=q-cc;
if(ca+ct+cg+cc>qq){
        cout<<"===\n";
}
else{
        int l=qq-(ca+ct+cg+cc);
    for(int i=0;i<s.length();i++){
       if(s[i]=='?'){
        if(ca>0){
            s[i]='A';
            ca--;
        }
        else if(ct>0){
            s[i]='T';
            ct--;
        }
        else if(cg>0){
            s[i]='G';
            cg--;
        }
        else if(cc>0){
            s[i]='C';
            cc--;
        }
    }
}
if(l>0){
        if(l%4!=0){
            cout<<"===\n";
            return 0;
        }
        else{
                l/=4;
                int j=0,i=0;
        while(j<l){
            if(s[i]=='?'){
                s[i]='A';
                j++;
            }
            i++;
        }
        j=0;
        while(j<l){
            if(s[i]=='?'){
                s[i]='G';
                j++;
            }
            i++;
        }
        j=0;
        while(j<l){
            if(s[i]=='?'){
                s[i]='T';
                j++;
            }
            i++;
        }
        j=0;
        while(j<l){
            if(s[i]=='?'){
                s[i]='C';
                j++;
            }
            i++;
        }
    }
}
        cout<<s<<'\n';
}
return 0;
}


#include <bits/stdc++.h>
#define MX 200000
#define M 1e18+7
#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define LL long long int
#define f first
#define s second
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++))
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SQRT 316
#define MAXN 1000
#define MAXM 1000
using namespace std;
int main(){
string s;
int ca=0,ct=0,cg=0,cc=0,qq=0,n;
cin>>n>>s;
for(int i=0;i<s.length();i++){
    if(s[i]=='A'){
        ca++;
    }
    else if(s[i]=='T'){
        ct++;
    }
    else if(s[i]=='G'){
        cg++;
    }
    else if(s[i]=='C'){
        cc++;
    }
    else if(s[i]=='?'){
        qq++;
    }
}
int q=max(ca,max(ct,max(cg,cc)));
ca=q-ca;
ct=q-ct;
cg=q-cg;
cc=q-cc;
if(ca+ct+cg+cc!=qq){
    cout<<"===\n";
}
else{
    for(int i=0;i<s.length();i++){
       if(s[i]=='?'){
        if(ca>0){
            s[i]='A';
            ca--;
        }
        else if(ct>0){
            s[i]='T';
            ct--;
        }
        else if(cg>0){
            s[i]='G';
            cg--;
        }
        else if(cc>0){
            s[i]='C';
            cc--;
        }
    }
}
    cout<<s<<'\n';
}

return 0;
}


#include <bits/stdc++.h>
#define MX 200000
#define M 1e18+7
#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define LL long long int
#define f first
#define s second
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++))
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SQRT 316
#define MAXN 1000
#define MAXM 1000
using namespace std;
int main(){
    string s;
int ca=0,ct=0,cg=0,cc=0,qq=0,n;
cin>>n>>s;
for(int i=0;i<s.length();i++){
    if(s[i]=='A'){
        ca++;
    }
    else if(s[i]=='T'){
        ct++;
    }
    else if(s[i]=='G'){
        cg++;
    }
    else if(s[i]=='C'){
        cc++;
    }
    else if(s[i]=='?'){
        qq++;
    }
}
int q=max(ca,max(ct,max(cg,cc)));
ca=q-ca;
ct=q-ct;
cg=q-cg;
cc=q-cc;
if(ca+ct+cg+cc>qq){
        cout<<"===\n";
}
else{
        int l=qq-(ca+ct+cg+cc);
    for(int i=0;i<s.length();i++){
       if(s[i]=='?'){
        if(ca>0){
            s[i]='A';
            ca--;
        }
        else if(ct>0){
            s[i]='T';
            ct--;
        }
        else if(cg>0){
            s[i]='G';
            cg--;
        }
        else if(cc>0){
            s[i]='C';
            cc--;
        }
    }
}
if(l>0){
        if(l%4!=0){
            cout<<"===\n";
            return 0;
        }
        else{
                l/=4;
                int j=0,i=0;
        while(j<l){
            if(s[i]=='?'){
                s[i]='A';
                j++;
            }
            i++;
        }
        j=0;
        while(j<l){
            if(s[i]=='?'){
                s[i]='G';
                j++;
            }
            i++;
        }
        j=0;
        while(j<l){
            if(s[i]=='?'){
                s[i]='T';
                j++;
            }
            i++;
        }
        j=0;
        while(j<l){
            if(s[i]=='?'){
                s[i]='C';
                j++;
            }
            i++;
        }
    }
}
        cout<<s<<'\n';
}
return 0;
}


#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <algorithm>
//#include <vector>
#define ll long long

using namespace std;

int main()
{
long x=0,y,n;
cin>>n;
string s;
cin>>s;
char c[n];
string s1="AGCT";
int a[4]={0};
for (int i=0; i<n; i++)
	if (s[i]!='?')
		{
			for (int j=0; j<4; j++)
			 if (s[i]==s1[j]) a[j]++;
			c[i]=s[i];
		}
if (n%4!=0) {cout<<"==="; exit(0);}
y=n/4;
for (int i=0; i<4; i++)
 if (a[i]>y) {cout<<"==="; exit(0);}
for (int i=0; i<n; i++)
	{
  	if (s[i]=='?')
			{
				for (int j=0; j<4; j++)
				 if (a[j]!=y)
				  {
				  	a[j]++;
				  	c[i]=s1[j];
				  	break;
					}

      }
  	cout<<c[i];
	}
return 0;
}


#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <algorithm>
//#include <vector>
#define ll long long

using namespace std;

int main()
{
long x=0,y,n;
cin>>n;
string s;
cin>>s;
char c[n];
string s1="AGCT";
int a[4]={0};
for (int i=0; i<n; i++)
	if (s[i]!='?')
		{
			for (int j=0; j<4; j++)
			 if (s[i]==s1[j]) a[j]++;
			c[i]=s[i];
		}
if (n%4!=0) {cout<<"==="; exit(0);}
y=n/4;
for (int i=0; i<4; i++)
 if (a[i]>y) {cout<<"==="; exit(0);}
y=0;
for (int i=0; i<n; i++)
	{
  	if (s[i]=='?') {c[i]=s1[y++]; if (y==4) y=0;}
  	cout<<c[i];
	}
return 0;
}


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

int main(){
    int n;
    cin >> n;

    string s,temp="ACGT";
    cin >> s;

    if(n%4!=0){
        cout << "===" << endl;
        return 0;
    }

    for(int i=0;i<4;i++){
        int sum=n/4-count(s.begin(),s.end(),temp[i]);
        if(sum>count(s.begin(),s.end(),'?')){cout << "===" << endl;return 0;}
        for(int j=0;j<sum;j++)
            s[s.find('?')]=temp[i];
    }
    cout << s << endl;
}


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

int main(){
    int n;
    cin >> n;

    string s;
    cin >> s;

    int a=0,c=0,g=0,t=0,r=0,diff=0;

    for(int i=0;i<s.length();i++){
        if(s[i]=='A')
            a++;
         if(s[i]=='G')
            g++;
         if(s[i]=='C')
            c++;
         if(s[i]=='T')
            t++;
         if(s[i]=='?')
            r++;
    }

    int m=max(a,max(c,max(g,t)));
    diff+=m-a;
    diff+=m-c;
    diff+=m-g;
    diff+=m-t;

    if(r%4==diff){
        int i=0,cnt=0;
      while(i<s.length()){
        if(s[i]=='?'){
       if(cnt<diff){
           if(a!=m){
             s[i]='A';
             a++;
           }
           else if(g!=m){
               s[i]='G';
               g++;
           }else if(c!=m){
               s[i]='C';
               c++;
           }else if(t!=m){
               s[i]='T';
               t++;
           }
       }else{
           if(cnt%r==0)
                s[i]='G';
            else if(cnt%r==1)
                s[i]='A';
             else if(cnt%r==2)
                s[i]='C';
                 else if(cnt%r==3)
                s[i]='T';
       }
       cnt++;
     }
        i++;
     }
     cout << s << endl;
    }else
        cout << "===" << endl;
}


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

int main(){
    int n;
    cin >> n;

    string s;
    cin >> s;

    int a=0,c=0,g=0,t=0,r=0,diff=0;

    for(int i=0;i<s.length();i++){
        if(s[i]=='A')
            a++;
         if(s[i]=='G')
            g++;
         if(s[i]=='C')
            c++;
         if(s[i]=='T')
            t++;
         if(s[i]=='?')
            r++;
    }

    int m=max(a,max(c,max(g,t)));
    diff+=m-a;
    diff+=m-c;
    diff+=m-g;
    diff+=m-t;

  //  cout << a << " " << c << " " << g << " " << t << endl;
//    cout << r << " " << diff << endl;
    if(r>=diff && r%4==diff%4){
        int i=0,cnt=0;
      while(i<s.length()){
        if(s[i]=='?'){
       if(cnt<diff){
           if(a!=m){
             s[i]='A';
             a++;
           }
           else if(g!=m){
               s[i]='G';
               g++;
           }else if(c!=m){
               s[i]='C';
               c++;
           }else if(t!=m){
               s[i]='T';
               t++;
           }
       }else{
           if(cnt%r==0)
                s[i]='G';
            else if(cnt%r==1)
                s[i]='A';
             else if(cnt%r==2)
                s[i]='C';
                 else if(cnt%r==3)
                s[i]='T';
       }
       cnt++;
     }
        i++;
     }
     cout << s << endl;
    }else
        cout << "===" << endl;
}


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

int main(){
    int n;
    cin >> n;

    string s;
    cin >> s;

    int a=0,c=0,g=0,t=0,r=0,diff=0;

    for(int i=0;i<s.length();i++){
        if(s[i]=='A')
            a++;
         if(s[i]=='G')
            g++;
         if(s[i]=='C')
            c++;
         if(s[i]=='T')
            t++;
         if(s[i]=='?')
            r++;
    }

    int m=max(a,max(c,max(g,t)));
    diff+=m-a;
    diff+=m-c;
    diff+=m-g;
    diff+=m-t;

  //  cout << a << " " << c << " " << g << " " << t << endl;
//    cout << r << " " << diff << endl;
    if(r>diff && r%4==diff%4){
        int i=0,cnt=0;
      while(i<s.length()){
        if(s[i]=='?'){
       if(cnt<diff){
           if(a!=m){
             s[i]='A';
             a++;
           }
           else if(g!=m){
               s[i]='G';
               g++;
           }else if(c!=m){
               s[i]='C';
               c++;
           }else if(t!=m){
               s[i]='T';
               t++;
           }
       }else{
           if(cnt%r==0)
                s[i]='G';
            else if(cnt%r==1)
                s[i]='A';
             else if(cnt%r==2)
                s[i]='C';
                 else if(cnt%r==3)
                s[i]='T';
       }
       cnt++;
     }
        i++;
     }
     cout << s << endl;
    }else
        cout << "===" << endl;
}


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

int main(){
    int n;
    cin >> n;

    string s;
    cin >> s;

    int a=0,c=0,g=0,t=0,r=0,diff=0;

    for(int i=0;i<s.length();i++){
        if(s[i]=='A')
            a++;
         if(s[i]=='G')
            g++;
         if(s[i]=='C')
            c++;
         if(s[i]=='T')
            t++;
         if(s[i]=='?')
            r++;
    }

    int m=max(a,max(c,max(g,t)));
    diff+=m-a;
    diff+=m-c;
    diff+=m-g;
    diff+=m-t;

    if(r%4==diff){
        int i=0,cnt=0;

      while(i<s.length()){
        if(s[i]=='?'){
       if(cnt<diff){
           if(a!=m){
             s[i]='A';
             a++;
           }
           else if(g!=m){
               s[i]='G';
               g++;
           }else if(c!=m){
               s[i]='C';
               c++;
           }else if(t!=m){
               s[i]='T';
               t++;
           }

       }else{
           if(cnt%diff==0)
                s[i]='g';
            else if(cnt%diff==1)
                s[i]='a';
             else if(cnt%diff==2)
                s[i]='c';
                 else if(cnt%diff==3)
                s[i]='t';
       }
       cnt++;
     }
        i++;
     }
     cout << s << endl;
    }else
        cout << "===" << endl;
}


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

void solve() {
    int n;
    string s;
    cin>>n;
    cin>>s;
    vector<char> b;
    string news = s;
    if(n%4!=0) {
        cout<<"===";
        return;
    }
    map<char, int> m;
    for(char c: s) {
        m[c]++;
    }
    if(m['?']==n) {
        for(int i=0; i<n/4; i++) {
            b.push_back('A');
        }
        for(int i=0; i<n/4; i++) {
            b.push_back('G');
        }
        for(int i=0; i<n/4; i++) {
            b.push_back('C');
        }
        for(int i=0; i<n/4; i++) {
            b.push_back('T');
        }
    }
    else {
        for(auto it = m.begin(); it != m.end(); it++) {
            char c = (*it).first;
            int v = (*it).second;
            if(c != '?') {
                if(v > n/4) {
                    cout<<"===";
                    return;
                } else {
                    for(int i=0; i<((n/4) - v); i++) {
                        b.push_back(c);
                    }
                }
            }
        }
    }
    int p=0;
    for(int i=0; i<s.size(); i++) {
        if(s[i]=='?') {
            news[i] = b[p];
            p++;
        }
    }
    cout<<news;
}

int main() {
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    long long t=1;
    //cin>>t;
    while(t--) {
        solve();
    }
    return 0;
}


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

int main() {
    ios_base::sync_with_stdio(false); cin.tie(NULL);
    int n;
    cin>>n;
    string s;
    cin>>s;
    map<char, int> m;
    int max=0;
    for(int i=0; i<n; i++) {
        m[s[i]]++;
        if(m[s[i]]>max && s[i]!='?') max = m[s[i]];
    }
    if(max*4 != n && max!=0) cout<<"===";
    else if(max==0) {
        if(n%4!=0) cout<<"===";
        else {
            max=n/4;
            for(int i=0; i<n; i++) {
                if(s[i]=='?') {
                    if(m['A']<max) s[i]='A';
                    else if(m['C']<max) s[i]='C';
                    else if(m['G']<max) s[i]='G';
                    else if(m['T']<max) s[i]='T';
                    m[s[i]]++;
                }
            }
            cout<<s;
            }
    }
    else {
        for(int i=0; i<n; i++) {
            if(s[i]=='?') {
                if(m['A']<max) s[i]='A';
                else if(m['C']<max) s[i]='C';
                else if(m['G']<max) s[i]='G';
                else if(m['T']<max) s[i]='T';
                m[s[i]]++;
            }
        }
        cout<<s;
    }
    return 0;
}


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

int main() {
    ios_base::sync_with_stdio(false); cin.tie(NULL);
    int n;
    cin>>n;
    string s;
    cin>>s;
    map<char, int> m;
    int max=0;
    for(int i=0; i<n; i++) {
        m[s[i]]++;
        if(m[s[i]]>max && s[i]!='?') max = m[s[i]];
    }
    if(max*4 != n) cout<<"===";
    else {
        for(int i=0; i<n; i++) {
            if(s[i]=='?') {
                if(m['A']<max) s[i]='A';
                else if(m['C']<max) s[i]='C';
                else if(m['G']<max) s[i]='G';
                else if(m['T']<max) s[i]='T';
                m[s[i]]++;
            }
        }
        cout<<s;
    }
    return 0;
}