#include #include #include using namespace std; typedef long long ll; bool agct(char c){ return c=='A' or c=='G' or c=='C' or c=='T'; } int main() { int n;string s;cin >>n>>s; int ans=0; for(int i=n-1;i>=0;i--)if(agct(s[i])) { ans=i+1; break; } cout<