import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        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 x = i; x < s.length(); x++){
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            }
            if(max < count){
            	max = count;
            }
        }
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        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 x = i; x < s.length(); x++){
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            }
            if(max < count){
            	max = count;
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) throws Exception {
        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 x = i; x < s.length(); x++){
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            }
            if(max < count){
            	max = count;
            }
        }
        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 x = i; x < s.length(); x++){
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            }
            if(max < count){
            	max = count;
            }
        }
        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 x = i; x < s.length(); x++){
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            }
            if(max < count){
            	max = count;
            }
        } 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 x = i; x < s.length(); x++){
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            }
            if(max < count){
            	max = count;
            }
        } {
        	int count = 0;
            for(int x = i; x < s.length(); x++){
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            }
            if(max < count){
            	max = count;
            }
        } int count = 0; count 0 for(int x = i; x < s.length(); x++){
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            } int x = i; int x = i; x i x < s.length() x s.length() s.length s x++ x++ x {
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            } {
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            } if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                } s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T' s.charAt(x) == 'G' s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T' s.charAt(x) == 'A' s.charAt(x) s.charAt s x 'A' s.charAt(x) == 'C' s.charAt(x) s.charAt s x 'C' s.charAt(x) == 'G' s.charAt(x) s.charAt s x 'G' s.charAt(x) == 'T' s.charAt(x) s.charAt s x 'T' {
                	count++;
                } count++ count {
                	break;
                } break; if(max < count){
            	max = count;
            } max < count max count {
            	max = count;
            } max = count max count 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) throws Exception {
        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 x = i; x < s.length(); x++){
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            }
            if(max < count){
            	max = count;
            }
        }
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        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 x = i; x < s.length(); x++){
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            }
            if(max < count){
            	max = count;
            }
        }
        System.out.println(max);
    }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        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 x = i; x < s.length(); x++){
                if(s.charAt(x) == 'A' || s.charAt(x) == 'C' || s.charAt(x) == 'G' || s.charAt(x) == 'T'){
                	count++;
                }else{
                	break;
                }
            }
            if(max < count){
            	max = count;
            }
        }
        System.out.println(max);
    }
}