#include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000000 bool check(char c){ if(c=='A'||c=='G'||c=='T'||c=='C')return true; return false; } int main() { int n; cin>>n; string s; cin>>s; int c = 0; rep(i,n){ if(check(s[i]))c++; } deque X,Y; rep(i,n)X.push_back(s[i]); while(c!=0){ while(X.size()>c){ Y.push_front(X.back()); X.pop_back(); } while(X.size()