import java.util.Scanner;
class Main{

    public static void main(String args[]){
        Main main = new Main();
        main.start();
    }

    public void start(){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String letters[] = str.split("");
        int max = 0;
        for(int i = 0; i < letters.length; i++){
            int num = countLength(letters,i);
            if(num > max) max = num;
        }
        System.out.println(max);
    }

    public int countLength(String[] letters,int index){
        int count = 0;
        for(int i = index; i < letters.length;i++){
            if(letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G")){
                count++;
            }else{
                return count;
            }
        }
        return count++;
    }
} import java.util.Scanner; Scanner java.util class Main{

    public static void main(String args[]){
        Main main = new Main();
        main.start();
    }

    public void start(){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String letters[] = str.split("");
        int max = 0;
        for(int i = 0; i < letters.length; i++){
            int num = countLength(letters,i);
            if(num > max) max = num;
        }
        System.out.println(max);
    }

    public int countLength(String[] letters,int index){
        int count = 0;
        for(int i = index; i < letters.length;i++){
            if(letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G")){
                count++;
            }else{
                return count;
            }
        }
        return count++;
    }
} Main public static void main(String args[]){
        Main main = new Main();
        main.start();
    } main {
        Main main = new Main();
        main.start();
    } Main main = new Main(); main new Main() main.start() main.start main String args[] args public void start(){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String letters[] = str.split("");
        int max = 0;
        for(int i = 0; i < letters.length; i++){
            int num = countLength(letters,i);
            if(num > max) max = num;
        }
        System.out.println(max);
    } start {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String letters[] = str.split("");
        int max = 0;
        for(int i = 0; i < letters.length; i++){
            int num = countLength(letters,i);
            if(num > max) max = num;
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc String letters[] = str.split(""); letters str.split("") str.split str "" int max = 0; max 0 for(int i = 0; i < letters.length; i++){
            int num = countLength(letters,i);
            if(num > max) max = num;
        } int i = 0; int i = 0; i 0 i < letters.length i letters.length letters letters.length i++ i++ i {
            int num = countLength(letters,i);
            if(num > max) max = num;
        } {
            int num = countLength(letters,i);
            if(num > max) max = num;
        } int num = countLength(letters,i); num countLength(letters,i) countLength letters i if(num > max) max = num; num > max num max max = num max num System.out.println(max) System.out.println System.out System System.out max public int countLength(String[] letters,int index){
        int count = 0;
        for(int i = index; i < letters.length;i++){
            if(letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G")){
                count++;
            }else{
                return count;
            }
        }
        return count++;
    } countLength {
        int count = 0;
        for(int i = index; i < letters.length;i++){
            if(letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G")){
                count++;
            }else{
                return count;
            }
        }
        return count++;
    } int count = 0; count 0 for(int i = index; i < letters.length;i++){
            if(letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G")){
                count++;
            }else{
                return count;
            }
        } int i = index; int i = index; i index i < letters.length i letters.length letters letters.length i++ i++ i {
            if(letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G")){
                count++;
            }else{
                return count;
            }
        } {
            if(letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G")){
                count++;
            }else{
                return count;
            }
        } if(letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G")){
                count++;
            }else{
                return count;
            } letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G") letters[i].equals("T") letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G") letters[i].equals("A") letters[i].equals letters[i] letters i "A" letters[i].equals("C") letters[i].equals letters[i] letters i "C" letters[i].equals("T") letters[i].equals letters[i] letters i "T" letters[i].equals("G") letters[i].equals letters[i] letters i "G" {
                count++;
            } count++ count {
                return count;
            } return count; count return count++; count++ count String[] letters letters int index index
import java.util.Scanner;
class Main{

    public static void main(String args[]){
        Main main = new Main();
        main.start();
    }

    public void start(){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String letters[] = str.split("");
        int max = 0;
        for(int i = 0; i < letters.length; i++){
            int num = countLength(letters,i);
            if(num > max) max = num;
        }
        System.out.println(max);
    }

    public int countLength(String[] letters,int index){
        int count = 0;
        for(int i = index; i < letters.length;i++){
            if(letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G")){
                count++;
            }else{
                return count;
            }
        }
        return count++;
    }
}