import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int len = 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') {
                continue;
            }
            if (s.substring(i).matches("[ACGT]*")) {
                len = Math.max(len, s.substring(i).length());
            }
            for (int j = i + 1; j < s.length(); j++) {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            }
        }
        System.out.println(len);
        sc.close();
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int len = 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') {
                continue;
            }
            if (s.substring(i).matches("[ACGT]*")) {
                len = Math.max(len, s.substring(i).length());
            }
            for (int j = i + 1; j < s.length(); j++) {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            }
        }
        System.out.println(len);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int len = 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') {
                continue;
            }
            if (s.substring(i).matches("[ACGT]*")) {
                len = Math.max(len, s.substring(i).length());
            }
            for (int j = i + 1; j < s.length(); j++) {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            }
        }
        System.out.println(len);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int len = 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') {
                continue;
            }
            if (s.substring(i).matches("[ACGT]*")) {
                len = Math.max(len, s.substring(i).length());
            }
            for (int j = i + 1; j < s.length(); j++) {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            }
        }
        System.out.println(len);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int len = 0; len 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') {
                continue;
            }
            if (s.substring(i).matches("[ACGT]*")) {
                len = Math.max(len, s.substring(i).length());
            }
            for (int j = i + 1; j < s.length(); j++) {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            }
        } 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') {
                continue;
            }
            if (s.substring(i).matches("[ACGT]*")) {
                len = Math.max(len, s.substring(i).length());
            }
            for (int j = i + 1; j < s.length(); j++) {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            }
        } {
            if (s.charAt(i) != 'A' 
            && s.charAt(i) != 'C'
            && s.charAt(i) != 'G'
            && s.charAt(i) != 'T') {
                continue;
            }
            if (s.substring(i).matches("[ACGT]*")) {
                len = Math.max(len, s.substring(i).length());
            }
            for (int j = i + 1; j < s.length(); j++) {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            }
        } if (s.charAt(i) != 'A' 
            && s.charAt(i) != 'C'
            && s.charAt(i) != 'G'
            && s.charAt(i) != 'T') {
                continue;
            } 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' {
                continue;
            } continue; if (s.substring(i).matches("[ACGT]*")) {
                len = Math.max(len, s.substring(i).length());
            } s.substring(i).matches("[ACGT]*") s.substring(i).matches s.substring(i) s.substring s i "[ACGT]*" {
                len = Math.max(len, s.substring(i).length());
            } len = Math.max(len, s.substring(i).length()) len Math.max(len, s.substring(i).length()) Math.max Math len s.substring(i).length() s.substring(i).length s.substring(i) s.substring s i for (int j = i + 1; j < s.length(); j++) {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            } int j = i + 1; int j = i + 1; j i + 1 i 1 j < s.length() j s.length() s.length s j++ j++ j {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            } {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            } if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                } s.substring(i, j).matches("[ACGT]*") s.substring(i, j).matches s.substring(i, j) s.substring s i j "[ACGT]*" {
                    len = Math.max(len, s.substring(i, j).length());
                } len = Math.max(len, s.substring(i, j).length()) len Math.max(len, s.substring(i, j).length()) Math.max Math len s.substring(i, j).length() s.substring(i, j).length s.substring(i, j) s.substring s i j System.out.println(len) System.out.println System.out System System.out len sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int len = 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') {
                continue;
            }
            if (s.substring(i).matches("[ACGT]*")) {
                len = Math.max(len, s.substring(i).length());
            }
            for (int j = i + 1; j < s.length(); j++) {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            }
        }
        System.out.println(len);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int len = 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') {
                continue;
            }
            if (s.substring(i).matches("[ACGT]*")) {
                len = Math.max(len, s.substring(i).length());
            }
            for (int j = i + 1; j < s.length(); j++) {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            }
        }
        System.out.println(len);
        sc.close();
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int len = 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') {
                continue;
            }
            if (s.substring(i).matches("[ACGT]*")) {
                len = Math.max(len, s.substring(i).length());
            }
            for (int j = i + 1; j < s.length(); j++) {
                if (s.substring(i, j).matches("[ACGT]*")) {
                    len = Math.max(len, s.substring(i, j).length());
                }
            }
        }
        System.out.println(len);
        sc.close();
    }
}