import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int max = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
                a++;
                if(a > max){
                    max = a;
                }
            }else{
                a = 0;
            }
        }
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int max = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
                a++;
                if(a > max){
                    max = a;
                }
            }else{
                a = 0;
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int max = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
                a++;
                if(a > max){
                    max = a;
                }
            }else{
                a = 0;
            }
        }
        System.out.println(max);
    } main {
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int max = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
                a++;
                if(a > max){
                    max = a;
                }
            }else{
                a = 0;
            }
        }
        System.out.println(max);
    } Scanner scan = new java.util.Scanner(System.in); scan new java.util.Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan int a = 0; a 0 int max = 0; max 0 for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
                a++;
                if(a > max){
                    max = a;
                }
            }else{
                a = 0;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
                a++;
                if(a > max){
                    max = a;
                }
            }else{
                a = 0;
            }
        } {
            if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
                a++;
                if(a > max){
                    max = a;
                }
            }else{
                a = 0;
            }
        } if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
                a++;
                if(a > max){
                    max = a;
                }
            }else{
                a = 0;
            } s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T' s.charAt(i) == 'G' s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T' s.charAt(i) == 'A' s.charAt(i) s.charAt s i 'A' s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' s.charAt(i) == 'G' s.charAt(i) s.charAt s i 'G' s.charAt(i) == 'T' s.charAt(i) s.charAt s i 'T' {
                a++;
                if(a > max){
                    max = a;
                }
            } a++ a if(a > max){
                    max = a;
                } a > max a max {
                    max = a;
                } max = a max a {
                a = 0;
            } a = 0 a 0 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int max = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
                a++;
                if(a > max){
                    max = a;
                }
            }else{
                a = 0;
            }
        }
        System.out.println(max);
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int max = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
                a++;
                if(a > max){
                    max = a;
                }
            }else{
                a = 0;
            }
        }
        System.out.println(max);
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int max = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
                a++;
                if(a > max){
                    max = a;
                }
            }else{
                a = 0;
            }
        }
        System.out.println(max);
    }
}