import java.io.*;

public class Main
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        char[] arr = br.readLine().toCharArray();
        int max = 0, cur = 0;
        for(char c : arr)
        {
            if( c =='A' || c=='T' || c=='C' || c=='G' )
            {
                max = Math.max(max,++cur);
            }
            else
            {
                cur = 0;
            }
        }
        bw.write(max+"");
        bw.close();

    }
} import java.io.*; io.* java public class Main
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        char[] arr = br.readLine().toCharArray();
        int max = 0, cur = 0;
        for(char c : arr)
        {
            if( c =='A' || c=='T' || c=='C' || c=='G' )
            {
                max = Math.max(max,++cur);
            }
            else
            {
                cur = 0;
            }
        }
        bw.write(max+"");
        bw.close();

    }
} Main public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        char[] arr = br.readLine().toCharArray();
        int max = 0, cur = 0;
        for(char c : arr)
        {
            if( c =='A' || c=='T' || c=='C' || c=='G' )
            {
                max = Math.max(max,++cur);
            }
            else
            {
                cur = 0;
            }
        }
        bw.write(max+"");
        bw.close();

    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        char[] arr = br.readLine().toCharArray();
        int max = 0, cur = 0;
        for(char c : arr)
        {
            if( c =='A' || c=='T' || c=='C' || c=='G' )
            {
                max = Math.max(max,++cur);
            }
            else
            {
                cur = 0;
            }
        }
        bw.write(max+"");
        bw.close();

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); bw new BufferedWriter(new OutputStreamWriter(System.out)) char[] arr = br.readLine().toCharArray(); arr br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br int max = 0 max 0 cur = 0; cur 0 for(char c : arr)
        {
            if( c =='A' || c=='T' || c=='C' || c=='G' )
            {
                max = Math.max(max,++cur);
            }
            else
            {
                cur = 0;
            }
        } char c arr {
            if( c =='A' || c=='T' || c=='C' || c=='G' )
            {
                max = Math.max(max,++cur);
            }
            else
            {
                cur = 0;
            }
        } {
            if( c =='A' || c=='T' || c=='C' || c=='G' )
            {
                max = Math.max(max,++cur);
            }
            else
            {
                cur = 0;
            }
        } if( c =='A' || c=='T' || c=='C' || c=='G' )
            {
                max = Math.max(max,++cur);
            }
            else
            {
                cur = 0;
            } c =='A' || c=='T' || c=='C' || c=='G' c=='C' c =='A' || c=='T' || c=='C' || c=='G' c =='A' c 'A' c=='T' c 'T' c=='C' c 'C' c=='G' c 'G' {
                max = Math.max(max,++cur);
            } max = Math.max(max,++cur) max Math.max(max,++cur) Math.max Math max ++cur cur {
                cur = 0;
            } cur = 0 cur 0 bw.write(max+"") bw.write bw max+"" max "" bw.close() bw.close bw String[] args args public class Main
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        char[] arr = br.readLine().toCharArray();
        int max = 0, cur = 0;
        for(char c : arr)
        {
            if( c =='A' || c=='T' || c=='C' || c=='G' )
            {
                max = Math.max(max,++cur);
            }
            else
            {
                cur = 0;
            }
        }
        bw.write(max+"");
        bw.close();

    }
} public class Main
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        char[] arr = br.readLine().toCharArray();
        int max = 0, cur = 0;
        for(char c : arr)
        {
            if( c =='A' || c=='T' || c=='C' || c=='G' )
            {
                max = Math.max(max,++cur);
            }
            else
            {
                cur = 0;
            }
        }
        bw.write(max+"");
        bw.close();

    }
} Main
import java.io.*;

public class Main
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        char[] arr = br.readLine().toCharArray();
        int max = 0, cur = 0;
        for(char c : arr)
        {
            if( c =='A' || c=='T' || c=='C' || c=='G' )
            {
                max = Math.max(max,++cur);
            }
            else
            {
                cur = 0;
            }
        }
        bw.write(max+"");
        bw.close();

    }
}
