import java.util.*;
import java.lang.*;

class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] list = new String[s.length()];
        int[] l = new int[s.length()+1];
        list = s.split("");
        int count =0;
        for( int i =0; i <s.length(); i++){
         if(list[i].equals("A") ||list[i].equals("G")||list[i].equals("C")||list[i].equals("T") ){
             count++;
         }else{
             l[i] = count;
             count =0;
         }

        }
        l[s.length()] = count;
        Arrays.sort(l);
        System.out.println(l[s.length()]);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] list = new String[s.length()];
        int[] l = new int[s.length()+1];
        list = s.split("");
        int count =0;
        for( int i =0; i <s.length(); i++){
         if(list[i].equals("A") ||list[i].equals("G")||list[i].equals("C")||list[i].equals("T") ){
             count++;
         }else{
             l[i] = count;
             count =0;
         }

        }
        l[s.length()] = count;
        Arrays.sort(l);
        System.out.println(l[s.length()]);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] list = new String[s.length()];
        int[] l = new int[s.length()+1];
        list = s.split("");
        int count =0;
        for( int i =0; i <s.length(); i++){
         if(list[i].equals("A") ||list[i].equals("G")||list[i].equals("C")||list[i].equals("T") ){
             count++;
         }else{
             l[i] = count;
             count =0;
         }

        }
        l[s.length()] = count;
        Arrays.sort(l);
        System.out.println(l[s.length()]);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] list = new String[s.length()];
        int[] l = new int[s.length()+1];
        list = s.split("");
        int count =0;
        for( int i =0; i <s.length(); i++){
         if(list[i].equals("A") ||list[i].equals("G")||list[i].equals("C")||list[i].equals("T") ){
             count++;
         }else{
             l[i] = count;
             count =0;
         }

        }
        l[s.length()] = count;
        Arrays.sort(l);
        System.out.println(l[s.length()]);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String[] list = new String[s.length()]; list new String[s.length()] s.length() s.length s int[] l = new int[s.length()+1]; l new int[s.length()+1] s.length()+1 s.length() s.length s 1 list = s.split("") list s.split("") s.split s "" int count =0; count 0 for( int i =0; i <s.length(); i++){
         if(list[i].equals("A") ||list[i].equals("G")||list[i].equals("C")||list[i].equals("T") ){
             count++;
         }else{
             l[i] = count;
             count =0;
         }

        } int i =0; int i =0; i 0 i <s.length() i s.length() s.length s i++ i++ i {
         if(list[i].equals("A") ||list[i].equals("G")||list[i].equals("C")||list[i].equals("T") ){
             count++;
         }else{
             l[i] = count;
             count =0;
         }

        } {
         if(list[i].equals("A") ||list[i].equals("G")||list[i].equals("C")||list[i].equals("T") ){
             count++;
         }else{
             l[i] = count;
             count =0;
         }

        } if(list[i].equals("A") ||list[i].equals("G")||list[i].equals("C")||list[i].equals("T") ){
             count++;
         }else{
             l[i] = count;
             count =0;
         } list[i].equals("A") ||list[i].equals("G")||list[i].equals("C")||list[i].equals("T") list[i].equals("C") list[i].equals("A") ||list[i].equals("G")||list[i].equals("C")||list[i].equals("T") list[i].equals("A") list[i].equals list[i] list i "A" list[i].equals("G") list[i].equals list[i] list i "G" list[i].equals("C") list[i].equals list[i] list i "C" list[i].equals("T") list[i].equals list[i] list i "T" {
             count++;
         } count++ count {
             l[i] = count;
             count =0;
         } l[i] = count l[i] l i count count =0 count 0 l[s.length()] = count l[s.length()] l s.length() s.length s count Arrays.sort(l) Arrays.sort Arrays l System.out.println(l[s.length()]) System.out.println System.out System System.out l[s.length()] l s.length() s.length s String[] args args
import java.util.*;
import java.lang.*;

class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] list = new String[s.length()];
        int[] l = new int[s.length()+1];
        list = s.split("");
        int count =0;
        for( int i =0; i <s.length(); i++){
         if(list[i].equals("A") ||list[i].equals("G")||list[i].equals("C")||list[i].equals("T") ){
             count++;
         }else{
             l[i] = count;
             count =0;
         }

        }
        l[s.length()] = count;
        Arrays.sort(l);
        System.out.println(l[s.length()]);
    }
}