import java.util.*;
public class Main {
    public static boolean isValid(char c){
        if(c == 'A' || c == 'C' || c == 'T' || c=='G'){
            return true;
        }
        return false;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max = 0;
        for(int i = 0 ; i < s.length() ; i++){
            int count = 0;
            for(int j = i ; j < s.length() ; j++){
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            }
        }
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main {
    public static boolean isValid(char c){
        if(c == 'A' || c == 'C' || c == 'T' || c=='G'){
            return true;
        }
        return false;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max = 0;
        for(int i = 0 ; i < s.length() ; i++){
            int count = 0;
            for(int j = i ; j < s.length() ; j++){
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            }
        }
        System.out.println(max);
    }
} Main public static boolean isValid(char c){
        if(c == 'A' || c == 'C' || c == 'T' || c=='G'){
            return true;
        }
        return false;
    } isValid {
        if(c == 'A' || c == 'C' || c == 'T' || c=='G'){
            return true;
        }
        return false;
    } if(c == 'A' || c == 'C' || c == 'T' || c=='G'){
            return true;
        } c == 'A' || c == 'C' || c == 'T' || c=='G' c == 'T' c == 'A' || c == 'C' || c == 'T' || c=='G' c == 'A' c 'A' c == 'C' c 'C' c == 'T' c 'T' c=='G' c 'G' {
            return true;
        } return true; true return false; false char c c public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max = 0;
        for(int i = 0 ; i < s.length() ; i++){
            int count = 0;
            for(int j = i ; j < s.length() ; j++){
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            }
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max = 0;
        for(int i = 0 ; i < s.length() ; i++){
            int count = 0;
            for(int j = i ; j < s.length() ; j++){
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            }
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int max = 0; max 0 for(int i = 0 ; i < s.length() ; i++){
            int count = 0;
            for(int j = i ; j < s.length() ; j++){
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            }
        } int i = 0 ; int i = 0 ; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            int count = 0;
            for(int j = i ; j < s.length() ; j++){
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            }
        } {
            int count = 0;
            for(int j = i ; j < s.length() ; j++){
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            }
        } int count = 0; count 0 for(int j = i ; j < s.length() ; j++){
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            } int j = i ; int j = i ; j i j < s.length() j s.length() s.length s j++ j++ j {
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            } {
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            } if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                } isValid(s.charAt(j)) isValid s.charAt(j) s.charAt s j {
                    count++;
                    max = Math.max(max,count);
                } count++ count max = Math.max(max,count) max Math.max(max,count) Math.max Math max count {
                    break;
                } break; System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static boolean isValid(char c){
        if(c == 'A' || c == 'C' || c == 'T' || c=='G'){
            return true;
        }
        return false;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max = 0;
        for(int i = 0 ; i < s.length() ; i++){
            int count = 0;
            for(int j = i ; j < s.length() ; j++){
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            }
        }
        System.out.println(max);
    }
} public class Main {
    public static boolean isValid(char c){
        if(c == 'A' || c == 'C' || c == 'T' || c=='G'){
            return true;
        }
        return false;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max = 0;
        for(int i = 0 ; i < s.length() ; i++){
            int count = 0;
            for(int j = i ; j < s.length() ; j++){
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            }
        }
        System.out.println(max);
    }
} Main
import java.util.*;
public class Main {
    public static boolean isValid(char c){
        if(c == 'A' || c == 'C' || c == 'T' || c=='G'){
            return true;
        }
        return false;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max = 0;
        for(int i = 0 ; i < s.length() ; i++){
            int count = 0;
            for(int j = i ; j < s.length() ; j++){
                if(isValid(s.charAt(j))){
                    count++;
                    max = Math.max(max,count);
                } else {
                    break;
                }
            }
        }
        System.out.println(max);
    }
}