import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String b = sc.next();
       
        HashSet<Character> set = new HashSet<>();
        set.add('A');
        set.add('T');
        set.add('C');
        set.add('G');
        int max = 0;
        int tmp = 0;
        for (char c : b.toCharArray()) {
            if (set.contains(c)) {
                tmp++;
            } else {
                max = Math.max(max, tmp);
                tmp = 0;
            }
        }
        max = Math.max(max, tmp);
        System.out.println(max);
    }
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String b = sc.next();
       
        HashSet<Character> set = new HashSet<>();
        set.add('A');
        set.add('T');
        set.add('C');
        set.add('G');
        int max = 0;
        int tmp = 0;
        for (char c : b.toCharArray()) {
            if (set.contains(c)) {
                tmp++;
            } else {
                max = Math.max(max, tmp);
                tmp = 0;
            }
        }
        max = Math.max(max, tmp);
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String b = sc.next();
       
        HashSet<Character> set = new HashSet<>();
        set.add('A');
        set.add('T');
        set.add('C');
        set.add('G');
        int max = 0;
        int tmp = 0;
        for (char c : b.toCharArray()) {
            if (set.contains(c)) {
                tmp++;
            } else {
                max = Math.max(max, tmp);
                tmp = 0;
            }
        }
        max = Math.max(max, tmp);
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String b = sc.next();
       
        HashSet<Character> set = new HashSet<>();
        set.add('A');
        set.add('T');
        set.add('C');
        set.add('G');
        int max = 0;
        int tmp = 0;
        for (char c : b.toCharArray()) {
            if (set.contains(c)) {
                tmp++;
            } else {
                max = Math.max(max, tmp);
                tmp = 0;
            }
        }
        max = Math.max(max, tmp);
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String b = sc.next(); b sc.next() sc.next sc HashSet<Character> set = new HashSet<>(); set new HashSet<>() set.add('A') set.add set 'A' set.add('T') set.add set 'T' set.add('C') set.add set 'C' set.add('G') set.add set 'G' int max = 0; max 0 int tmp = 0; tmp 0 for (char c : b.toCharArray()) {
            if (set.contains(c)) {
                tmp++;
            } else {
                max = Math.max(max, tmp);
                tmp = 0;
            }
        } char c b.toCharArray() b.toCharArray b {
            if (set.contains(c)) {
                tmp++;
            } else {
                max = Math.max(max, tmp);
                tmp = 0;
            }
        } {
            if (set.contains(c)) {
                tmp++;
            } else {
                max = Math.max(max, tmp);
                tmp = 0;
            }
        } if (set.contains(c)) {
                tmp++;
            } else {
                max = Math.max(max, tmp);
                tmp = 0;
            } set.contains(c) set.contains set c {
                tmp++;
            } tmp++ tmp {
                max = Math.max(max, tmp);
                tmp = 0;
            } max = Math.max(max, tmp) max Math.max(max, tmp) Math.max Math max tmp tmp = 0 tmp 0 max = Math.max(max, tmp) max Math.max(max, tmp) Math.max Math max tmp 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 sc = new Scanner(System.in);
        String b = sc.next();
       
        HashSet<Character> set = new HashSet<>();
        set.add('A');
        set.add('T');
        set.add('C');
        set.add('G');
        int max = 0;
        int tmp = 0;
        for (char c : b.toCharArray()) {
            if (set.contains(c)) {
                tmp++;
            } else {
                max = Math.max(max, tmp);
                tmp = 0;
            }
        }
        max = Math.max(max, tmp);
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String b = sc.next();
       
        HashSet<Character> set = new HashSet<>();
        set.add('A');
        set.add('T');
        set.add('C');
        set.add('G');
        int max = 0;
        int tmp = 0;
        for (char c : b.toCharArray()) {
            if (set.contains(c)) {
                tmp++;
            } else {
                max = Math.max(max, tmp);
                tmp = 0;
            }
        }
        max = Math.max(max, tmp);
        System.out.println(max);
    }
} Main
import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String b = sc.next();
       
        HashSet<Character> set = new HashSet<>();
        set.add('A');
        set.add('T');
        set.add('C');
        set.add('G');
        int max = 0;
        int tmp = 0;
        for (char c : b.toCharArray()) {
            if (set.contains(c)) {
                tmp++;
            } else {
                max = Math.max(max, tmp);
                tmp = 0;
            }
        }
        max = Math.max(max, tmp);
        System.out.println(max);
    }
}
