/*#include <iostream>
#include <string>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <cstdlib>
using namespace std;

int main()
{
    int num[]={1,3,5,4,9,2,4,3,6,2};
    string buf,str;
    sort( num, num+10 );
    cin >> buf >> str;
    for(int i=0; i<10; i++)
        cout << num[i] << " ";
    cout << buf+str;
    return 0;
}*/
/*#include <iostream>
#include <cstring>
#include <cstdio>

using namespace std;

char str[100005];

int main()
{
    int n;
    scanf("%d ",&n);
    gets(str);
    int i=0,j=1,a=0;
    for(i=0,j=1;j<n;i++,j++){
        if(str[j]<str[i])
            a=1;
        if(str[j]>str[i])
            i=0;
    }
    if(a)
        printf("YES\n");
    else
        printf("NO\n");
    return 0;
}*/
/*#include <iostream>
#include <cstring>
#include <cstdio>

using namespace std;

int main()
{
    int T;
    cin >> T;
    while(T--)
    {
        long long a,b,c,d;
        cin >> a >> b >> c >> d;
        if(a==2305843009213693952&&b==2305843009213693952&&c==2305843009213693952&&d==2305843009213693952)
            cout << "9223372036854775808" << endl;
        else
            cout << a+b+c+d << endl;
    }
    return 0;
}*/
//-2305843009213693952


/*#include<iostream>
using namespace std;
const long long mod = 1e9+7;
long long fun[20000]={1,1,3,11};

void fun2()
{
    int i;
    for(i=4;i<20000;i++)
  //      fun[i]=(i*fun[i-1]%mod+(i-1)*fun[i-2]%mod)%mod;
        fun[i]=(i*fun[i-1]%mod+(i*fun[i-2]-fun[i-2])%mod)%mod;
}
int n;
int main(){
    fun2();
    while(cin>>n){
        cout<<fun[n]<< endl;
    }
    return 0;
}*/
/*#include <iostream>
#include <cstring>
#include <cstdio>

using namespace std;

 long long fib[1005]={1,1};

void Fib()
{
    int i;
    for(i=2;i<1000;i++)
        fib[i]=fib[i-1]+fib[i-2];
}
int main()
{
  //  Fib();
    //for(int k=0;k<10;k++)
    //    cout << " " << fib[k + 1] * fib[k + 1]<< "," <<fib[k] * fib[k + 2] << endl;
     //   cout << " " << fib[k + 1] * fib[k + 1]-fib[k] * fib[k + 2] << endl;
    long long k;
    cin >> k;
    if(k&1)
        cout << "-1";
    else
        cout << "1";
    return 0;
}*/
/*#include <iostream>
#include <cstring>
#include <cstdio>

using namespace std;

const int MAX=10000;
int isprime[MAX],prime[MAX];
int cnt=0;

void pri(void)
{
    memset(isprime,1,sizeof(isprime));
    isprime[0]=isprime[1]=0;
    for(int i=2;i<MAX;i++){
        if(isprime[i])
            prime[cnt++]=i;
       //     cout << prime[b];

        for(int a=0;a<i&&prime[a]*i<MAX;a++)
            isprime[prime[a]*i]=0;
    }
}
int main()
{
    int n;
    cin >> n;
    pri();//prime[303]>2000
 //   cout <<cnt;
   // for(int i=0;i<=313;i++){
   //     if(prime[i]>2000){
   //         printf("%d,",prime[i]);
  //          break;
   //     }
  //  }
    while(n--)
    {
        int k,m,d;
        cin >> k;
        switch(k%6){
            case 1:m=1,d=10;
                    break;
            case 2:m=2,d=20;
                    break;
            case 3:m=3,d=30;
                    break;
            case 4:m=10,d=1;
                    break;
            case 5:m=11,d=11;
                    break;
            case 0:m=12,d=21;
                    break;
        }
        if(k%6==0)
            printf("%d-%02d-%02d\n",prime[303+k/6-1],m,d);
        else
            printf("%d-%02d-%02d\n",prime[303+k/6],m,d);
    }
    return 0;
}*/
/*#include <cstdio>
#include <iostream>

void hanoi(int n,char x,char y,char z)
{
    if(n>0)
    {
        hanoi(n−1,x,z,y);
        printf("\n Move disk %d from %c to %c",n,x,z);
        hanoi(n−1,y,x,z);
    }
}

int main(void)
{
    int n;
    printf("Input the number disks to be moved:");
    scanf("%d",&n);
    hanoi(n,'X','Y','Z');
    return 0;
}*/
/*#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>

using namespace std;

struct algorithm{
    int opt;
    long long x;
}alg[105];

int main()
{
    long long X;
    int n;
    scanf("%d%I64d",&n,&X);
    while(n--)
        scanf("%d%I64d",&alg[n].opt,&alg[n].x);
    for(int i=1;i<=n;i++)
        printf("%d %I64d",alg[n].opt,alg[n].x);
    for(int i=1;i<=n;i++){
        if(alg[i].opt==1)
            X-=alg[i].x;
        else if(alg[i].opt==2)
            X+=alg[i].x;
        else if(alg[i].opt==3)
            X/=alg[i].x;
        else if(alg[i].opt==4)
            X*=alg[i].x;
    }

    printf("%I64d",X);
    return 0;
}*/
/*#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int two=0,four=0,zero=1,a,s=0;
    while(n--){
        cin >> a;
        if(a==2) two++;
        else if(a==4) four++;
        else if(a==0) zero++;
    }
    if(four>=zero){
        s+=(zero*2-1)*16;
        cout << s << endl;
        if(four-zero>=two)
            s+=two*2*4;
        else
            s+=((four-zero)*2+1)*4;
    }else if(four<zero){
        s+=four*2*16;
        cout << s << endl;
        if(zero-four>two)
            s+=two*2*4;
        else
            s+=((zero-four)*2-1)*4;
    }
    cout << s;

    return 0;
}

*/
/*#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>

using namespace std;

bool compare(int a,int b)
{
    return a+b>a-b;
}
int main()
{
    int f[]={5,6,2,6,3,9,1,8,1,62,0,2,8,2,2};
    sort(f,f+15,compare);
    for(int i=0;i<15;i++)
        cout << f[i] << " ";

    return 0;
}*/

/*#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>

using namespace std;
int f[10005];

int main()
{
    int n,s=0;
    cin >> n;
    for(int i=0;i<n;i++){
        cin >> f[i];
        if(f[i]<60)
            s++;
    }
    cout << s*400;
    return 0;
}*/
/*#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>

using namespace std;

int main()
{
    printf("***menu***\n1.input\n2.display\n3.sort\n4.search\n5.insert\n6.delete\n7.save\n8.load\n9.exit\n**********\n");
    char n,a;
    while(scanf("%c%c",&n,&a)==2){
       // scanf(" ",&a);
        switch(n-'0'){
            case 1: printf("input OK\n");
                break;
            case 2: printf("display OK\n");
                break;
            case 3: printf("sort OK\n");
                break;
            case 4: printf("search OK\n");
                break;
            case 5: printf("insert OK\n");
                break;
            case 6: printf("delete OK\n");
                break;
            case 7: printf("save OK\n");
                break;
            case 8: printf("load OK\n");
                break;
            case 9: printf("exit OK\n");
                break;
            default:
                    printf("ERROR\n");
                break;
        }
    }
    return 0;
}*/
/*#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

struct student{
    char xh[15];
    char xm[15];
    int num[3];
}stu[105];

void input(struct student *p)
{
    scanf(" %s",p->xh);
    scanf(" %s",p->xm);
    for(int j=0;j<3;j++)
        cin >> p->num[j];
}

void print(struct student st)
{
    printf("%s,%s",st.xh,st.xm);
    for(int j=0;j<3;j++)
        printf(",%d",st.num[j]);
    puts("");
}

int main()
{
    int N;
    cin >> N;
    for(int i=0;i<N;i++)
        input(&stu[i]);
    for(int i=0;i<N;i++)
        print(stu[i]);
    return 0;
}*/
/*#include <iostream>
#include <cstdio>
#include <algorithm>
#include <iomanip>

using namespace std;

int main()
{
    int Pa,Pb;
    cin >> Pa >> Pb ;
    int a,b,c;
    cin >> a >> b >> c;
    int s=a+b+c;
    if(s==0||Pa>Pb&&s!=3)
        printf("The winner is a: %d + %d",Pa,3-s);
    else
        printf("The winner is b: %d + %d",Pb,s);
    return 0;
}*/
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <iomanip>

using namespace std;

int main()
{
    char s[15];
    cin >> s;
    int maxx=0,cnt=0;
    for(int i=0; i<10; i++)
    {
        if(s[i]=='A'||s[i]=='G'||s[i]=='C'||s[i]=='T')
        {
            //  printf("ddd");
            cnt=1;
            for(int j=i+1; j<10; j++)
            {
                if(s[j]=='A'||s[j]=='G'||s[j]=='C'||s[j]=='T')
                {
                    cnt++;
                    //       printf("cnt=%d\n",cnt);
                }

                else
                {
                    if(cnt>maxx)
                    {
                        maxx=cnt;
                        //            printf("maxx=%d\n",maxx);
                    }
                    break;
                }
                if(j==9)
                {
                    if(cnt>maxx)
                    {
                        maxx=cnt;
                        //            printf("maxx=%d\n",maxx);
                    }
                }
                //  printf("cnt=%d",cnt);
            }
        }

    }
    cout << maxx;
    return 0;
}



Measured memory_bytes: 384