import java.math.BigInteger;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max_count = 0;
        int count = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G'){
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            }else{
                count = 0;
            }
        }
        System.out.println(max_count);
    }
} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max_count = 0;
        int count = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G'){
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            }else{
                count = 0;
            }
        }
        System.out.println(max_count);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max_count = 0;
        int count = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G'){
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            }else{
                count = 0;
            }
        }
        System.out.println(max_count);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max_count = 0;
        int count = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G'){
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            }else{
                count = 0;
            }
        }
        System.out.println(max_count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int max_count = 0; max_count 0 int count = 0; count 0 for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G'){
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            }else{
                count = 0;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if(s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G'){
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            }else{
                count = 0;
            }
        } {
            if(s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G'){
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            }else{
                count = 0;
            }
        } if(s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G'){
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            }else{
                count = 0;
            } s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G' s.charAt(i) == 'C' s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G' s.charAt(i) == 'A' s.charAt(i) s.charAt s i 'A' s.charAt(i) == 'T' s.charAt(i) s.charAt s i 'T' s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' s.charAt(i) == 'G' s.charAt(i) s.charAt s i 'G' {
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            } count += 1 count 1 if(count > max_count){
                    max_count = count;
                } count > max_count count max_count {
                    max_count = count;
                } max_count = count max_count count {
                count = 0;
            } count = 0 count 0 System.out.println(max_count) System.out.println System.out System System.out max_count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max_count = 0;
        int count = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G'){
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            }else{
                count = 0;
            }
        }
        System.out.println(max_count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max_count = 0;
        int count = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G'){
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            }else{
                count = 0;
            }
        }
        System.out.println(max_count);
    }
} Main
import java.math.BigInteger;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max_count = 0;
        int count = 0;
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'C' || s.charAt(i) == 'G'){
                count += 1;
                if(count > max_count){
                    max_count = count;
                }
            }else{
                count = 0;
            }
        }
        System.out.println(max_count);
    }
}