import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] c = sc.next().toCharArray();
        List<Character> diff = new ArrayList<Character>(Arrays.asList('A', 'C', 'G', 'T'));

        int count = 0;
        int maxCount = 0;
        for (int i = 0; i < c.length; i++) {
            for (int j = i; j < c.length; j++) {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            }
            count = 0;
        }

        System.out.println(maxCount);
        sc.close();
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] c = sc.next().toCharArray();
        List<Character> diff = new ArrayList<Character>(Arrays.asList('A', 'C', 'G', 'T'));

        int count = 0;
        int maxCount = 0;
        for (int i = 0; i < c.length; i++) {
            for (int j = i; j < c.length; j++) {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            }
            count = 0;
        }

        System.out.println(maxCount);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] c = sc.next().toCharArray();
        List<Character> diff = new ArrayList<Character>(Arrays.asList('A', 'C', 'G', 'T'));

        int count = 0;
        int maxCount = 0;
        for (int i = 0; i < c.length; i++) {
            for (int j = i; j < c.length; j++) {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            }
            count = 0;
        }

        System.out.println(maxCount);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        char[] c = sc.next().toCharArray();
        List<Character> diff = new ArrayList<Character>(Arrays.asList('A', 'C', 'G', 'T'));

        int count = 0;
        int maxCount = 0;
        for (int i = 0; i < c.length; i++) {
            for (int j = i; j < c.length; j++) {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            }
            count = 0;
        }

        System.out.println(maxCount);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] c = sc.next().toCharArray(); c sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc List<Character> diff = new ArrayList<Character>(Arrays.asList('A', 'C', 'G', 'T')); diff new ArrayList<Character>(Arrays.asList('A', 'C', 'G', 'T')) int count = 0; count 0 int maxCount = 0; maxCount 0 for (int i = 0; i < c.length; i++) {
            for (int j = i; j < c.length; j++) {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            }
            count = 0;
        } int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
            for (int j = i; j < c.length; j++) {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            }
            count = 0;
        } {
            for (int j = i; j < c.length; j++) {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            }
            count = 0;
        } for (int j = i; j < c.length; j++) {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            } int j = i; int j = i; j i j < c.length j c.length c c.length j++ j++ j {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            } {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            } if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                } diff.contains(c[j]) diff.contains diff c[j] c j {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } count++ count if (maxCount < count) {
                        maxCount = count;
                    } maxCount < count maxCount count {
                        maxCount = count;
                    } maxCount = count maxCount count {
                    break;
                } break; count = 0 count 0 System.out.println(maxCount) System.out.println System.out System System.out maxCount sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] c = sc.next().toCharArray();
        List<Character> diff = new ArrayList<Character>(Arrays.asList('A', 'C', 'G', 'T'));

        int count = 0;
        int maxCount = 0;
        for (int i = 0; i < c.length; i++) {
            for (int j = i; j < c.length; j++) {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            }
            count = 0;
        }

        System.out.println(maxCount);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] c = sc.next().toCharArray();
        List<Character> diff = new ArrayList<Character>(Arrays.asList('A', 'C', 'G', 'T'));

        int count = 0;
        int maxCount = 0;
        for (int i = 0; i < c.length; i++) {
            for (int j = i; j < c.length; j++) {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            }
            count = 0;
        }

        System.out.println(maxCount);
        sc.close();
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] c = sc.next().toCharArray();
        List<Character> diff = new ArrayList<Character>(Arrays.asList('A', 'C', 'G', 'T'));

        int count = 0;
        int maxCount = 0;
        for (int i = 0; i < c.length; i++) {
            for (int j = i; j < c.length; j++) {
                if (diff.contains(c[j])) {
                    count++;
                    if (maxCount < count) {
                        maxCount = count;
                    }
                } else {
                    break;
                }
            }
            count = 0;
        }

        System.out.println(maxCount);
        sc.close();
    }
}