import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        char[] cs = {'A', 'C', 'G', 'T'};
        int count = 0;
        int current = 0;
        for (int i = 0; i < s.length(); i++) {
            char t = s.charAt(i);
            boolean continuous = false;
            for (char c : cs) {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            }
            if (!continuous) {
                count = Math.max(count, current);
                current = 0;
            }
        }

        if (current != 0) {
            count = Math.max(count, current);
        }

        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        char[] cs = {'A', 'C', 'G', 'T'};
        int count = 0;
        int current = 0;
        for (int i = 0; i < s.length(); i++) {
            char t = s.charAt(i);
            boolean continuous = false;
            for (char c : cs) {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            }
            if (!continuous) {
                count = Math.max(count, current);
                current = 0;
            }
        }

        if (current != 0) {
            count = Math.max(count, current);
        }

        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        char[] cs = {'A', 'C', 'G', 'T'};
        int count = 0;
        int current = 0;
        for (int i = 0; i < s.length(); i++) {
            char t = s.charAt(i);
            boolean continuous = false;
            for (char c : cs) {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            }
            if (!continuous) {
                count = Math.max(count, current);
                current = 0;
            }
        }

        if (current != 0) {
            count = Math.max(count, current);
        }

        System.out.println(count);
    } main {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        char[] cs = {'A', 'C', 'G', 'T'};
        int count = 0;
        int current = 0;
        for (int i = 0; i < s.length(); i++) {
            char t = s.charAt(i);
            boolean continuous = false;
            for (char c : cs) {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            }
            if (!continuous) {
                count = Math.max(count, current);
                current = 0;
            }
        }

        if (current != 0) {
            count = Math.max(count, current);
        }

        System.out.println(count);
    } Scanner std = new Scanner(System.in); std new Scanner(System.in) String s = std.next(); s std.next() std.next std char[] cs = {'A', 'C', 'G', 'T'}; cs {'A', 'C', 'G', 'T'} 'A' 'C' 'G' 'T' int count = 0; count 0 int current = 0; current 0 for (int i = 0; i < s.length(); i++) {
            char t = s.charAt(i);
            boolean continuous = false;
            for (char c : cs) {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            }
            if (!continuous) {
                count = Math.max(count, current);
                current = 0;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            char t = s.charAt(i);
            boolean continuous = false;
            for (char c : cs) {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            }
            if (!continuous) {
                count = Math.max(count, current);
                current = 0;
            }
        } {
            char t = s.charAt(i);
            boolean continuous = false;
            for (char c : cs) {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            }
            if (!continuous) {
                count = Math.max(count, current);
                current = 0;
            }
        } char t = s.charAt(i); t s.charAt(i) s.charAt s i boolean continuous = false; continuous false for (char c : cs) {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            } char c cs {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            } {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            } if (t == c) {
                    current++;
                    continuous = true;
                } t == c t c {
                    current++;
                    continuous = true;
                } current++ current continuous = true continuous true if (!continuous) {
                count = Math.max(count, current);
                current = 0;
            } !continuous continuous {
                count = Math.max(count, current);
                current = 0;
            } count = Math.max(count, current) count Math.max(count, current) Math.max Math count current current = 0 current 0 if (current != 0) {
            count = Math.max(count, current);
        } current != 0 current 0 {
            count = Math.max(count, current);
        } count = Math.max(count, current) count Math.max(count, current) Math.max Math count current 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 std = new Scanner(System.in);
        String s = std.next();
        char[] cs = {'A', 'C', 'G', 'T'};
        int count = 0;
        int current = 0;
        for (int i = 0; i < s.length(); i++) {
            char t = s.charAt(i);
            boolean continuous = false;
            for (char c : cs) {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            }
            if (!continuous) {
                count = Math.max(count, current);
                current = 0;
            }
        }

        if (current != 0) {
            count = Math.max(count, current);
        }

        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        char[] cs = {'A', 'C', 'G', 'T'};
        int count = 0;
        int current = 0;
        for (int i = 0; i < s.length(); i++) {
            char t = s.charAt(i);
            boolean continuous = false;
            for (char c : cs) {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            }
            if (!continuous) {
                count = Math.max(count, current);
                current = 0;
            }
        }

        if (current != 0) {
            count = Math.max(count, current);
        }

        System.out.println(count);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        char[] cs = {'A', 'C', 'G', 'T'};
        int count = 0;
        int current = 0;
        for (int i = 0; i < s.length(); i++) {
            char t = s.charAt(i);
            boolean continuous = false;
            for (char c : cs) {
                if (t == c) {
                    current++;
                    continuous = true;
                }
            }
            if (!continuous) {
                count = Math.max(count, current);
                current = 0;
            }
        }

        if (current != 0) {
            count = Math.max(count, current);
        }

        System.out.println(count);
    }
}
