

import java.util.Scanner;

public class Main {
    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        char[] c = sc.next().toCharArray();
        String ACGT = "ACGT";
        int ans = Integer.MIN_VALUE;
        int count = 0;
        for (int i = 0; i < c.length; i++) {
            if (ACGT.indexOf(c[i]) >= 0) {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        ans = Math.max(ans, count);
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        char[] c = sc.next().toCharArray();
        String ACGT = "ACGT";
        int ans = Integer.MIN_VALUE;
        int count = 0;
        for (int i = 0; i < c.length; i++) {
            if (ACGT.indexOf(c[i]) >= 0) {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        ans = Math.max(ans, count);
        System.out.println(ans);
    }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        char[] c = sc.next().toCharArray();
        String ACGT = "ACGT";
        int ans = Integer.MIN_VALUE;
        int count = 0;
        for (int i = 0; i < c.length; i++) {
            if (ACGT.indexOf(c[i]) >= 0) {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        ans = Math.max(ans, count);
        System.out.println(ans);
    } main {
        char[] c = sc.next().toCharArray();
        String ACGT = "ACGT";
        int ans = Integer.MIN_VALUE;
        int count = 0;
        for (int i = 0; i < c.length; i++) {
            if (ACGT.indexOf(c[i]) >= 0) {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        ans = Math.max(ans, count);
        System.out.println(ans);
    } char[] c = sc.next().toCharArray(); c sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc String ACGT = "ACGT"; ACGT "ACGT" int ans = Integer.MIN_VALUE; ans Integer.MIN_VALUE Integer Integer.MIN_VALUE int count = 0; count 0 for (int i = 0; i < c.length; i++) {
            if (ACGT.indexOf(c[i]) >= 0) {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        } int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
            if (ACGT.indexOf(c[i]) >= 0) {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        } {
            if (ACGT.indexOf(c[i]) >= 0) {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        } if (ACGT.indexOf(c[i]) >= 0) {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            } ACGT.indexOf(c[i]) >= 0 ACGT.indexOf(c[i]) ACGT.indexOf ACGT c[i] c i 0 {
                count++;
            } count++ count {
                ans = Math.max(ans, count);
                count = 0;
            } ans = Math.max(ans, count) ans Math.max(ans, count) Math.max Math ans count count = 0 count 0 ans = Math.max(ans, count) ans Math.max(ans, count) Math.max Math ans count System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        char[] c = sc.next().toCharArray();
        String ACGT = "ACGT";
        int ans = Integer.MIN_VALUE;
        int count = 0;
        for (int i = 0; i < c.length; i++) {
            if (ACGT.indexOf(c[i]) >= 0) {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        ans = Math.max(ans, count);
        System.out.println(ans);
    }
} public class Main {
    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        char[] c = sc.next().toCharArray();
        String ACGT = "ACGT";
        int ans = Integer.MIN_VALUE;
        int count = 0;
        for (int i = 0; i < c.length; i++) {
            if (ACGT.indexOf(c[i]) >= 0) {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        ans = Math.max(ans, count);
        System.out.println(ans);
    }
} Main


import java.util.Scanner;

public class Main {
    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        char[] c = sc.next().toCharArray();
        String ACGT = "ACGT";
        int ans = Integer.MIN_VALUE;
        int count = 0;
        for (int i = 0; i < c.length; i++) {
            if (ACGT.indexOf(c[i]) >= 0) {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        ans = Math.max(ans, count);
        System.out.println(ans);
    }
}
