
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int left = 0;
        int max = 0;
        int right=0;
        while(true){
            while(right < s.length && (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G'))right++;
            max = Math.max(max,right-left);
            if(right >= s.length)break;
            left = right+1;
            right++;
        }
        sc.close();
        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int left = 0;
        int max = 0;
        int right=0;
        while(true){
            while(right < s.length && (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G'))right++;
            max = Math.max(max,right-left);
            if(right >= s.length)break;
            left = right+1;
            right++;
        }
        sc.close();
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int left = 0;
        int max = 0;
        int right=0;
        while(true){
            while(right < s.length && (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G'))right++;
            max = Math.max(max,right-left);
            if(right >= s.length)break;
            left = right+1;
            right++;
        }
        sc.close();
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int left = 0;
        int max = 0;
        int right=0;
        while(true){
            while(right < s.length && (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G'))right++;
            max = Math.max(max,right-left);
            if(right >= s.length)break;
            left = right+1;
            right++;
        }
        sc.close();
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int left = 0; left 0 int max = 0; max 0 int right=0; right 0 while(true){
            while(right < s.length && (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G'))right++;
            max = Math.max(max,right-left);
            if(right >= s.length)break;
            left = right+1;
            right++;
        } true {
            while(right < s.length && (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G'))right++;
            max = Math.max(max,right-left);
            if(right >= s.length)break;
            left = right+1;
            right++;
        } while(right < s.length && (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G'))right++; right < s.length && (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G') right < s.length right s.length s s.length (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G') s[right] == 'C' s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G' s[right]=='A' s[right] s right 'A' s[right]=='T' s[right] s right 'T' s[right] == 'C' s[right] s right 'C' s[right] == 'G' s[right] s right 'G' right++ right max = Math.max(max,right-left) max Math.max(max,right-left) Math.max Math max right-left right left if(right >= s.length)break; right >= s.length right s.length s s.length break; left = right+1 left right+1 right 1 right++ right sc.close() sc.close sc System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int left = 0;
        int max = 0;
        int right=0;
        while(true){
            while(right < s.length && (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G'))right++;
            max = Math.max(max,right-left);
            if(right >= s.length)break;
            left = right+1;
            right++;
        }
        sc.close();
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int left = 0;
        int max = 0;
        int right=0;
        while(true){
            while(right < s.length && (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G'))right++;
            max = Math.max(max,right-left);
            if(right >= s.length)break;
            left = right+1;
            right++;
        }
        sc.close();
        System.out.println(max);
    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int left = 0;
        int max = 0;
        int right=0;
        while(true){
            while(right < s.length && (s[right]=='A' || s[right]=='T' || s[right] == 'C' || s[right] == 'G'))right++;
            max = Math.max(max,right-left);
            if(right >= s.length)break;
            left = right+1;
            right++;
        }
        sc.close();
        System.out.println(max);
    }
}