
import java.util.Scanner;

public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        int current = 0;
        int max = 0;
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (c == 'A' || c == 'T' || c == 'C' || c == 'G') {
                ++current;
            } else {
                max = Math.max(max, current);
                current = 0;
            }
        }
        max = Math.max(max, current);
        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        int current = 0;
        int max = 0;
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (c == 'A' || c == 'T' || c == 'C' || c == 'G') {
                ++current;
            } else {
                max = Math.max(max, current);
                current = 0;
            }
        }
        max = Math.max(max, current);
        System.out.println(max);
    }
} Main public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        int current = 0;
        int max = 0;
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (c == 'A' || c == 'T' || c == 'C' || c == 'G') {
                ++current;
            } else {
                max = Math.max(max, current);
                current = 0;
            }
        }
        max = Math.max(max, current);
        System.out.println(max);
    } main {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        int current = 0;
        int max = 0;
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (c == 'A' || c == 'T' || c == 'C' || c == 'G') {
                ++current;
            } else {
                max = Math.max(max, current);
                current = 0;
            }
        }
        max = Math.max(max, current);
        System.out.println(max);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.next(); s scanner.next() scanner.next scanner int current = 0; current 0 int max = 0; max 0 for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (c == 'A' || c == 'T' || c == 'C' || c == 'G') {
                ++current;
            } else {
                max = Math.max(max, current);
                current = 0;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s ++i ++i i {
            char c = s.charAt(i);
            if (c == 'A' || c == 'T' || c == 'C' || c == 'G') {
                ++current;
            } else {
                max = Math.max(max, current);
                current = 0;
            }
        } {
            char c = s.charAt(i);
            if (c == 'A' || c == 'T' || c == 'C' || c == 'G') {
                ++current;
            } else {
                max = Math.max(max, current);
                current = 0;
            }
        } char c = s.charAt(i); c s.charAt(i) s.charAt s i if (c == 'A' || c == 'T' || c == 'C' || c == 'G') {
                ++current;
            } else {
                max = Math.max(max, current);
                current = 0;
            } c == 'A' || c == 'T' || c == 'C' || c == 'G' c == 'C' c == 'A' || c == 'T' || c == 'C' || c == 'G' c == 'A' c 'A' c == 'T' c 'T' c == 'C' c 'C' c == 'G' c 'G' {
                ++current;
            } ++current current {
                max = Math.max(max, current);
                current = 0;
            } max = Math.max(max, current) max Math.max(max, current) Math.max Math max current current = 0 current 0 max = Math.max(max, current) max Math.max(max, current) Math.max Math max current 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 scanner = new Scanner(System.in);
        String s = scanner.next();
        int current = 0;
        int max = 0;
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (c == 'A' || c == 'T' || c == 'C' || c == 'G') {
                ++current;
            } else {
                max = Math.max(max, current);
                current = 0;
            }
        }
        max = Math.max(max, current);
        System.out.println(max);
    }
} public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        int current = 0;
        int max = 0;
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (c == 'A' || c == 'T' || c == 'C' || c == 'G') {
                ++current;
            } else {
                max = Math.max(max, current);
                current = 0;
            }
        }
        max = Math.max(max, current);
        System.out.println(max);
    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        int current = 0;
        int max = 0;
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (c == 'A' || c == 'T' || c == 'C' || c == 'G') {
                ++current;
            } else {
                max = Math.max(max, current);
                current = 0;
            }
        }
        max = Math.max(max, current);
        System.out.println(max);
    }
}
