import java.util.Scanner;
class Main{
    public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        String base=scn.next();
        int cnt=0;
        int max=0;
        for(int i=0;i<base.length();i++){
            switch(base.charAt(i)){
                case 'A':
                case 'T':
                case 'C':
                case 'G':
                    cnt++;
                    if(i==base.length()-1&&cnt>max) max=cnt;
                    break;
                default:
                    if(cnt>max) max=cnt;
                    cnt=0;
                    break;
            }
        }
        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        String base=scn.next();
        int cnt=0;
        int max=0;
        for(int i=0;i<base.length();i++){
            switch(base.charAt(i)){
                case 'A':
                case 'T':
                case 'C':
                case 'G':
                    cnt++;
                    if(i==base.length()-1&&cnt>max) max=cnt;
                    break;
                default:
                    if(cnt>max) max=cnt;
                    cnt=0;
                    break;
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        String base=scn.next();
        int cnt=0;
        int max=0;
        for(int i=0;i<base.length();i++){
            switch(base.charAt(i)){
                case 'A':
                case 'T':
                case 'C':
                case 'G':
                    cnt++;
                    if(i==base.length()-1&&cnt>max) max=cnt;
                    break;
                default:
                    if(cnt>max) max=cnt;
                    cnt=0;
                    break;
            }
        }
        System.out.println(max);
    } main {
        Scanner scn=new Scanner(System.in);
        String base=scn.next();
        int cnt=0;
        int max=0;
        for(int i=0;i<base.length();i++){
            switch(base.charAt(i)){
                case 'A':
                case 'T':
                case 'C':
                case 'G':
                    cnt++;
                    if(i==base.length()-1&&cnt>max) max=cnt;
                    break;
                default:
                    if(cnt>max) max=cnt;
                    cnt=0;
                    break;
            }
        }
        System.out.println(max);
    } Scanner scn=new Scanner(System.in); scn new Scanner(System.in) String base=scn.next(); base scn.next() scn.next scn int cnt=0; cnt 0 int max=0; max 0 for(int i=0;i<base.length();i++){
            switch(base.charAt(i)){
                case 'A':
                case 'T':
                case 'C':
                case 'G':
                    cnt++;
                    if(i==base.length()-1&&cnt>max) max=cnt;
                    break;
                default:
                    if(cnt>max) max=cnt;
                    cnt=0;
                    break;
            }
        } int i=0; int i=0; i 0 i<base.length() i base.length() base.length base i++ i++ i {
            switch(base.charAt(i)){
                case 'A':
                case 'T':
                case 'C':
                case 'G':
                    cnt++;
                    if(i==base.length()-1&&cnt>max) max=cnt;
                    break;
                default:
                    if(cnt>max) max=cnt;
                    cnt=0;
                    break;
            }
        } {
            switch(base.charAt(i)){
                case 'A':
                case 'T':
                case 'C':
                case 'G':
                    cnt++;
                    if(i==base.length()-1&&cnt>max) max=cnt;
                    break;
                default:
                    if(cnt>max) max=cnt;
                    cnt=0;
                    break;
            }
        } switch(base.charAt(i)){
                case 'A':
                case 'T':
                case 'C':
                case 'G':
                    cnt++;
                    if(i==base.length()-1&&cnt>max) max=cnt;
                    break;
                default:
                    if(cnt>max) max=cnt;
                    cnt=0;
                    break;
            } base.charAt(i) base.charAt base i case 'A': 'A' case 'A': case 'T': 'T' case 'T': case 'C': 'C' case 'C': case 'G': 'G' case 'G': cnt++ cnt if(i==base.length()-1&&cnt>max) max=cnt; i==base.length()-1&&cnt>max i==base.length()-1 i base.length()-1 base.length() base.length base 1 cnt>max cnt max max=cnt max cnt break; default: default: if(cnt>max) max=cnt; cnt>max cnt max max=cnt max cnt cnt=0 cnt 0 break; System.out.println(max) System.out.println System.out System System.out max String[] args args
import java.util.Scanner;
class Main{
    public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        String base=scn.next();
        int cnt=0;
        int max=0;
        for(int i=0;i<base.length();i++){
            switch(base.charAt(i)){
                case 'A':
                case 'T':
                case 'C':
                case 'G':
                    cnt++;
                    if(i==base.length()-1&&cnt>max) max=cnt;
                    break;
                default:
                    if(cnt>max) max=cnt;
                    cnt=0;
                    break;
            }
        }
        System.out.println(max);
    }
}