import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        char[] charArrays = a.toCharArray();

        int max = 0;
        for (int i=0; i<charArrays.length; i++) {
            StringBuilder sb = new StringBuilder();
            for (int j=i; j<charArrays.length; j++) {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            }
        }

        System.out.println(max);
    }

    public static boolean isACGT(char c) {
        String s = String.valueOf(c);
        switch (s) {
            case "A":
                return true;
            case "C":
                return true;
            case "G":
                return true;
            case "T":
                return true;
            default:
                return false;
        }
    }
} import java.io.File; File java.io import java.io.FileInputStream; FileInputStream java.io import java.io.FileNotFoundException; FileNotFoundException java.io import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        char[] charArrays = a.toCharArray();

        int max = 0;
        for (int i=0; i<charArrays.length; i++) {
            StringBuilder sb = new StringBuilder();
            for (int j=i; j<charArrays.length; j++) {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            }
        }

        System.out.println(max);
    }

    public static boolean isACGT(char c) {
        String s = String.valueOf(c);
        switch (s) {
            case "A":
                return true;
            case "C":
                return true;
            case "G":
                return true;
            case "T":
                return true;
            default:
                return false;
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        char[] charArrays = a.toCharArray();

        int max = 0;
        for (int i=0; i<charArrays.length; i++) {
            StringBuilder sb = new StringBuilder();
            for (int j=i; j<charArrays.length; j++) {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            }
        }

        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        char[] charArrays = a.toCharArray();

        int max = 0;
        for (int i=0; i<charArrays.length; i++) {
            StringBuilder sb = new StringBuilder();
            for (int j=i; j<charArrays.length; j++) {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            }
        }

        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc char[] charArrays = a.toCharArray(); charArrays a.toCharArray() a.toCharArray a int max = 0; max 0 for (int i=0; i<charArrays.length; i++) {
            StringBuilder sb = new StringBuilder();
            for (int j=i; j<charArrays.length; j++) {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            }
        } int i=0; int i=0; i 0 i<charArrays.length i charArrays.length charArrays charArrays.length i++ i++ i {
            StringBuilder sb = new StringBuilder();
            for (int j=i; j<charArrays.length; j++) {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            }
        } {
            StringBuilder sb = new StringBuilder();
            for (int j=i; j<charArrays.length; j++) {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            }
        } StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int j=i; j<charArrays.length; j++) {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            } int j=i; int j=i; j i j<charArrays.length j charArrays.length charArrays charArrays.length j++ j++ j {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            } {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            } if (!isACGT(charArrays[j])) {
                    break;
                } !isACGT(charArrays[j]) isACGT(charArrays[j]) isACGT charArrays[j] charArrays j {
                    break;
                } break; sb.append(charArrays[j]) sb.append sb charArrays[j] charArrays j String ret = sb.toString(); ret sb.toString() sb.toString sb if (max < ret.length()) {
                    max = ret.length();
                } max < ret.length() max ret.length() ret.length ret {
                    max = ret.length();
                } max = ret.length() max ret.length() ret.length ret System.out.println(max) System.out.println System.out System System.out max String[] args args public static boolean isACGT(char c) {
        String s = String.valueOf(c);
        switch (s) {
            case "A":
                return true;
            case "C":
                return true;
            case "G":
                return true;
            case "T":
                return true;
            default:
                return false;
        }
    } isACGT {
        String s = String.valueOf(c);
        switch (s) {
            case "A":
                return true;
            case "C":
                return true;
            case "G":
                return true;
            case "T":
                return true;
            default:
                return false;
        }
    } String s = String.valueOf(c); s String.valueOf(c) String.valueOf String c switch (s) {
            case "A":
                return true;
            case "C":
                return true;
            case "G":
                return true;
            case "T":
                return true;
            default:
                return false;
        } s case "A": "A" case "A": return true; true case "C": "C" case "C": return true; true case "G": "G" case "G": return true; true case "T": "T" case "T": return true; true default: default: return false; false char c c public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        char[] charArrays = a.toCharArray();

        int max = 0;
        for (int i=0; i<charArrays.length; i++) {
            StringBuilder sb = new StringBuilder();
            for (int j=i; j<charArrays.length; j++) {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            }
        }

        System.out.println(max);
    }

    public static boolean isACGT(char c) {
        String s = String.valueOf(c);
        switch (s) {
            case "A":
                return true;
            case "C":
                return true;
            case "G":
                return true;
            case "T":
                return true;
            default:
                return false;
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        char[] charArrays = a.toCharArray();

        int max = 0;
        for (int i=0; i<charArrays.length; i++) {
            StringBuilder sb = new StringBuilder();
            for (int j=i; j<charArrays.length; j++) {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            }
        }

        System.out.println(max);
    }

    public static boolean isACGT(char c) {
        String s = String.valueOf(c);
        switch (s) {
            case "A":
                return true;
            case "C":
                return true;
            case "G":
                return true;
            case "T":
                return true;
            default:
                return false;
        }
    }
} Main
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        char[] charArrays = a.toCharArray();

        int max = 0;
        for (int i=0; i<charArrays.length; i++) {
            StringBuilder sb = new StringBuilder();
            for (int j=i; j<charArrays.length; j++) {
                if (!isACGT(charArrays[j])) {
                    break;
                }
                sb.append(charArrays[j]);
                String ret = sb.toString();
                if (max < ret.length()) {
                    max = ret.length();
                }
            }
        }

        System.out.println(max);
    }

    public static boolean isACGT(char c) {
        String s = String.valueOf(c);
        switch (s) {
            case "A":
                return true;
            case "C":
                return true;
            case "G":
                return true;
            case "T":
                return true;
            default:
                return false;
        }
    }
}
