import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc. nextLine();
        
        char []str_t_char = str.toCharArray();
        char []ACGT = {'A', 'C', 'G', 'T'};
        
        int ans = 0;
        
        for (int i = 0 ; i < str_t_char.length; i++){
            int count = 0;
            for (int iter = i; iter < str_t_char.length; iter++){
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } 
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc. nextLine();
        
        char []str_t_char = str.toCharArray();
        char []ACGT = {'A', 'C', 'G', 'T'};
        
        int ans = 0;
        
        for (int i = 0 ; i < str_t_char.length; i++){
            int count = 0;
            for (int iter = i; iter < str_t_char.length; iter++){
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } 
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc. nextLine();
        
        char []str_t_char = str.toCharArray();
        char []ACGT = {'A', 'C', 'G', 'T'};
        
        int ans = 0;
        
        for (int i = 0 ; i < str_t_char.length; i++){
            int count = 0;
            for (int iter = i; iter < str_t_char.length; iter++){
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } 
        }
        System.out.println(ans);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc. nextLine();
        
        char []str_t_char = str.toCharArray();
        char []ACGT = {'A', 'C', 'G', 'T'};
        
        int ans = 0;
        
        for (int i = 0 ; i < str_t_char.length; i++){
            int count = 0;
            for (int iter = i; iter < str_t_char.length; iter++){
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } 
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc. nextLine(); str sc. nextLine() sc. nextLine sc char []str_t_char = str.toCharArray(); str_t_char str.toCharArray() str.toCharArray str char []ACGT = {'A', 'C', 'G', 'T'}; ACGT {'A', 'C', 'G', 'T'} 'A' 'C' 'G' 'T' int ans = 0; ans 0 for (int i = 0 ; i < str_t_char.length; i++){
            int count = 0;
            for (int iter = i; iter < str_t_char.length; iter++){
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } 
        } int i = 0 ; int i = 0 ; i 0 i < str_t_char.length i str_t_char.length str_t_char str_t_char.length i++ i++ i {
            int count = 0;
            for (int iter = i; iter < str_t_char.length; iter++){
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } 
        } {
            int count = 0;
            for (int iter = i; iter < str_t_char.length; iter++){
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } 
        } int count = 0; count 0 for (int iter = i; iter < str_t_char.length; iter++){
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } int iter = i; int iter = i; iter i iter < str_t_char.length iter str_t_char.length str_t_char str_t_char.length iter++ iter++ iter {
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } {
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } boolean flag = false; flag false for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                } int k = 0; int k = 0; k 0 k < ACGT.length k ACGT.length ACGT ACGT.length k++ k++ k {
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                } {
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                } if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } str_t_char[iter] == ACGT[k] str_t_char[iter] str_t_char iter ACGT[k] ACGT k {
                        flag = true;
                        break;
                    } flag = true flag true break; if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                } flag {
                    count++;
                    ans = Math.max(ans, count);
                } count++ count ans = Math.max(ans, count) ans Math.max(ans, count) Math.max Math ans count {
                    break;
                } break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc. nextLine();
        
        char []str_t_char = str.toCharArray();
        char []ACGT = {'A', 'C', 'G', 'T'};
        
        int ans = 0;
        
        for (int i = 0 ; i < str_t_char.length; i++){
            int count = 0;
            for (int iter = i; iter < str_t_char.length; iter++){
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } 
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc. nextLine();
        
        char []str_t_char = str.toCharArray();
        char []ACGT = {'A', 'C', 'G', 'T'};
        
        int ans = 0;
        
        for (int i = 0 ; i < str_t_char.length; i++){
            int count = 0;
            for (int iter = i; iter < str_t_char.length; iter++){
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } 
        }
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc. nextLine();
        
        char []str_t_char = str.toCharArray();
        char []ACGT = {'A', 'C', 'G', 'T'};
        
        int ans = 0;
        
        for (int i = 0 ; i < str_t_char.length; i++){
            int count = 0;
            for (int iter = i; iter < str_t_char.length; iter++){
                boolean flag = false;
                for (int k = 0; k < ACGT.length; k++){
                    if (str_t_char[iter] == ACGT[k]){
                        flag = true;
                        break;
                    } 
                }
                
                if (flag){
                    count++;
                    ans = Math.max(ans, count);
                }else {
                    break;
                }
            } 
        }
        System.out.println(ans);
    }
}
