import java.util.Scanner;

// 18
public class Main{

    public static void main(String[] args) {
        String s = (new Scanner(System.in)).next();
        char[] acgt = {'A', 'C', 'G', 'T'};

        int ans = 0;
        int tmp1 = 0;
        for(int i = 0; i < s.length(); i++) {
            int tmp2 = tmp1;
            for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            }
            if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            }
        }
        ans = Math.max(ans, tmp1);

        System.out.println(ans);
    }

}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz