import java.util.*;

public class Main {
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        Set<Character> letters = new HashSet<>();
        letters.add('A');
        letters.add('T');
        letters.add('C');
        letters.add('G');

        int count = 0;
        int max = 0;

        for (char c : s.toCharArray()) {
            if (letters.contains(c)) count++;
            else count = 0;
            max = Math.max(max, count);
        }
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        Set<Character> letters = new HashSet<>();
        letters.add('A');
        letters.add('T');
        letters.add('C');
        letters.add('G');

        int count = 0;
        int max = 0;

        for (char c : s.toCharArray()) {
            if (letters.contains(c)) count++;
            else count = 0;
            max = Math.max(max, count);
        }
        System.out.println(max);
    }
} Main public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        Set<Character> letters = new HashSet<>();
        letters.add('A');
        letters.add('T');
        letters.add('C');
        letters.add('G');

        int count = 0;
        int max = 0;

        for (char c : s.toCharArray()) {
            if (letters.contains(c)) count++;
            else count = 0;
            max = Math.max(max, count);
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        Set<Character> letters = new HashSet<>();
        letters.add('A');
        letters.add('T');
        letters.add('C');
        letters.add('G');

        int count = 0;
        int max = 0;

        for (char c : s.toCharArray()) {
            if (letters.contains(c)) count++;
            else count = 0;
            max = Math.max(max, count);
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc Set<Character> letters = new HashSet<>(); letters new HashSet<>() letters.add('A') letters.add letters 'A' letters.add('T') letters.add letters 'T' letters.add('C') letters.add letters 'C' letters.add('G') letters.add letters 'G' int count = 0; count 0 int max = 0; max 0 for (char c : s.toCharArray()) {
            if (letters.contains(c)) count++;
            else count = 0;
            max = Math.max(max, count);
        } char c s.toCharArray() s.toCharArray s {
            if (letters.contains(c)) count++;
            else count = 0;
            max = Math.max(max, count);
        } {
            if (letters.contains(c)) count++;
            else count = 0;
            max = Math.max(max, count);
        } if (letters.contains(c)) count++;
            else count = 0; letters.contains(c) letters.contains letters c count++ count count = 0 count 0 max = Math.max(max, count) max Math.max(max, count) Math.max Math max count 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[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        Set<Character> letters = new HashSet<>();
        letters.add('A');
        letters.add('T');
        letters.add('C');
        letters.add('G');

        int count = 0;
        int max = 0;

        for (char c : s.toCharArray()) {
            if (letters.contains(c)) count++;
            else count = 0;
            max = Math.max(max, count);
        }
        System.out.println(max);
    }
} public class Main {
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        Set<Character> letters = new HashSet<>();
        letters.add('A');
        letters.add('T');
        letters.add('C');
        letters.add('G');

        int count = 0;
        int max = 0;

        for (char c : s.toCharArray()) {
            if (letters.contains(c)) count++;
            else count = 0;
            max = Math.max(max, count);
        }
        System.out.println(max);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        Set<Character> letters = new HashSet<>();
        letters.add('A');
        letters.add('T');
        letters.add('C');
        letters.add('G');

        int count = 0;
        int max = 0;

        for (char c : s.toCharArray()) {
            if (letters.contains(c)) count++;
            else count = 0;
            max = Math.max(max, count);
        }
        System.out.println(max);
    }
}