import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String tmp = scan.next() + "d";
        int tmpCount = 0, count = 0;
        String ACGTString[] = tmp.split("");
        for (String nuc : ACGTString) {
            if (nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T")) {
                tmpCount += 1;
            } else {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            }
        }
        System.out.println(count);

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String tmp = scan.next() + "d";
        int tmpCount = 0, count = 0;
        String ACGTString[] = tmp.split("");
        for (String nuc : ACGTString) {
            if (nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T")) {
                tmpCount += 1;
            } else {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            }
        }
        System.out.println(count);

    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String tmp = scan.next() + "d";
        int tmpCount = 0, count = 0;
        String ACGTString[] = tmp.split("");
        for (String nuc : ACGTString) {
            if (nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T")) {
                tmpCount += 1;
            } else {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            }
        }
        System.out.println(count);

    } main {
        Scanner scan = new Scanner(System.in);
        String tmp = scan.next() + "d";
        int tmpCount = 0, count = 0;
        String ACGTString[] = tmp.split("");
        for (String nuc : ACGTString) {
            if (nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T")) {
                tmpCount += 1;
            } else {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            }
        }
        System.out.println(count);

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String tmp = scan.next() + "d"; tmp scan.next() + "d" scan.next() scan.next scan "d" int tmpCount = 0 tmpCount 0 count = 0; count 0 String ACGTString[] = tmp.split(""); ACGTString tmp.split("") tmp.split tmp "" for (String nuc : ACGTString) {
            if (nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T")) {
                tmpCount += 1;
            } else {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            }
        } String nuc ACGTString {
            if (nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T")) {
                tmpCount += 1;
            } else {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            }
        } {
            if (nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T")) {
                tmpCount += 1;
            } else {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            }
        } if (nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T")) {
                tmpCount += 1;
            } else {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            } nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T") nuc.equals("C") nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T") nuc.equals("A") nuc.equals nuc "A" nuc.equals("G") nuc.equals nuc "G" nuc.equals("C") nuc.equals nuc "C" nuc.equals("T") nuc.equals nuc "T" {
                tmpCount += 1;
            } tmpCount += 1 tmpCount 1 {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            } if (count < tmpCount) {
                    count = tmpCount;
                } count < tmpCount count tmpCount {
                    count = tmpCount;
                } count = tmpCount count tmpCount tmpCount = 0 tmpCount 0 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String tmp = scan.next() + "d";
        int tmpCount = 0, count = 0;
        String ACGTString[] = tmp.split("");
        for (String nuc : ACGTString) {
            if (nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T")) {
                tmpCount += 1;
            } else {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            }
        }
        System.out.println(count);

    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String tmp = scan.next() + "d";
        int tmpCount = 0, count = 0;
        String ACGTString[] = tmp.split("");
        for (String nuc : ACGTString) {
            if (nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T")) {
                tmpCount += 1;
            } else {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            }
        }
        System.out.println(count);

    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String tmp = scan.next() + "d";
        int tmpCount = 0, count = 0;
        String ACGTString[] = tmp.split("");
        for (String nuc : ACGTString) {
            if (nuc.equals("A") || nuc.equals("G") || nuc.equals("C") || nuc.equals("T")) {
                tmpCount += 1;
            } else {
                if (count < tmpCount) {
                    count = tmpCount;
                }
                tmpCount = 0;
            }
        }
        System.out.println(count);

    }
}
