import java.util.*;

public class Main {

    static final int MOD = 1000000007;

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        char[] str = sc.next().toCharArray();
        char[] ACGT = {'A','C','G','T'};
        for(int i=0;i<str.length;i++){
            for(Character d:ACGT){
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            }
        }

        int ans = 0;
        int now = 0;
        for(Character c:str){
            if(c=='A'){
                now++;
                ans = Math.max(ans,now);
            }
            else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {

    static final int MOD = 1000000007;

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        char[] str = sc.next().toCharArray();
        char[] ACGT = {'A','C','G','T'};
        for(int i=0;i<str.length;i++){
            for(Character d:ACGT){
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            }
        }

        int ans = 0;
        int now = 0;
        for(Character c:str){
            if(c=='A'){
                now++;
                ans = Math.max(ans,now);
            }
            else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(ans);
    }
} Main static final int MOD = 1000000007; MOD 1000000007 public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        char[] str = sc.next().toCharArray();
        char[] ACGT = {'A','C','G','T'};
        for(int i=0;i<str.length;i++){
            for(Character d:ACGT){
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            }
        }

        int ans = 0;
        int now = 0;
        for(Character c:str){
            if(c=='A'){
                now++;
                ans = Math.max(ans,now);
            }
            else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(ans);
    } main {

        Scanner sc = new Scanner(System.in);
        char[] str = sc.next().toCharArray();
        char[] ACGT = {'A','C','G','T'};
        for(int i=0;i<str.length;i++){
            for(Character d:ACGT){
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            }
        }

        int ans = 0;
        int now = 0;
        for(Character c:str){
            if(c=='A'){
                now++;
                ans = Math.max(ans,now);
            }
            else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] str = sc.next().toCharArray(); str sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc char[] ACGT = {'A','C','G','T'}; ACGT {'A','C','G','T'} 'A' 'C' 'G' 'T' for(int i=0;i<str.length;i++){
            for(Character d:ACGT){
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            }
        } int i=0; int i=0; i 0 i<str.length i str.length str str.length i++ i++ i {
            for(Character d:ACGT){
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            }
        } {
            for(Character d:ACGT){
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            }
        } for(Character d:ACGT){
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            } Character d ACGT {
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            } {
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            } if(str[i]==d){
                    str[i]='A';
                    break;
                } str[i]==d str[i] str i d {
                    str[i]='A';
                    break;
                } str[i]='A' str[i] str i 'A' break; int ans = 0; ans 0 int now = 0; now 0 for(Character c:str){
            if(c=='A'){
                now++;
                ans = Math.max(ans,now);
            }
            else{
                ans = Math.max(ans,now);
                now = 0;
            }
        } Character c str {
            if(c=='A'){
                now++;
                ans = Math.max(ans,now);
            }
            else{
                ans = Math.max(ans,now);
                now = 0;
            }
        } {
            if(c=='A'){
                now++;
                ans = Math.max(ans,now);
            }
            else{
                ans = Math.max(ans,now);
                now = 0;
            }
        } if(c=='A'){
                now++;
                ans = Math.max(ans,now);
            }
            else{
                ans = Math.max(ans,now);
                now = 0;
            } c=='A' c 'A' {
                now++;
                ans = Math.max(ans,now);
            } now++ now ans = Math.max(ans,now) ans Math.max(ans,now) Math.max Math ans now {
                ans = Math.max(ans,now);
                now = 0;
            } ans = Math.max(ans,now) ans Math.max(ans,now) Math.max Math ans now now = 0 now 0 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    static final int MOD = 1000000007;

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        char[] str = sc.next().toCharArray();
        char[] ACGT = {'A','C','G','T'};
        for(int i=0;i<str.length;i++){
            for(Character d:ACGT){
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            }
        }

        int ans = 0;
        int now = 0;
        for(Character c:str){
            if(c=='A'){
                now++;
                ans = Math.max(ans,now);
            }
            else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(ans);
    }
} public class Main {

    static final int MOD = 1000000007;

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        char[] str = sc.next().toCharArray();
        char[] ACGT = {'A','C','G','T'};
        for(int i=0;i<str.length;i++){
            for(Character d:ACGT){
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            }
        }

        int ans = 0;
        int now = 0;
        for(Character c:str){
            if(c=='A'){
                now++;
                ans = Math.max(ans,now);
            }
            else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {

    static final int MOD = 1000000007;

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        char[] str = sc.next().toCharArray();
        char[] ACGT = {'A','C','G','T'};
        for(int i=0;i<str.length;i++){
            for(Character d:ACGT){
                if(str[i]==d){
                    str[i]='A';
                    break;
                }
            }
        }

        int ans = 0;
        int now = 0;
        for(Character c:str){
            if(c=='A'){
                now++;
                ans = Math.max(ans,now);
            }
            else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(ans);
    }
}
