import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s= scan.next();
		scan.close();
		int cnt=0;
		int max=0;
		int check=0;
		char acgt[] = {'A','C','G','T'};
		for(int i=0;i<s.length();i++) {
			for(int j=0;j<4;j++) {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			}
			if(check==0||i==s.length()-1) {
				if(max<cnt)max=cnt;
				cnt=0;

			}
			check=0;
		}
		System.out.println(max);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s= scan.next();
		scan.close();
		int cnt=0;
		int max=0;
		int check=0;
		char acgt[] = {'A','C','G','T'};
		for(int i=0;i<s.length();i++) {
			for(int j=0;j<4;j++) {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			}
			if(check==0||i==s.length()-1) {
				if(max<cnt)max=cnt;
				cnt=0;

			}
			check=0;
		}
		System.out.println(max);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s= scan.next();
		scan.close();
		int cnt=0;
		int max=0;
		int check=0;
		char acgt[] = {'A','C','G','T'};
		for(int i=0;i<s.length();i++) {
			for(int j=0;j<4;j++) {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			}
			if(check==0||i==s.length()-1) {
				if(max<cnt)max=cnt;
				cnt=0;

			}
			check=0;
		}
		System.out.println(max);
	} main {
		Scanner scan = new Scanner(System.in);
		String s= scan.next();
		scan.close();
		int cnt=0;
		int max=0;
		int check=0;
		char acgt[] = {'A','C','G','T'};
		for(int i=0;i<s.length();i++) {
			for(int j=0;j<4;j++) {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			}
			if(check==0||i==s.length()-1) {
				if(max<cnt)max=cnt;
				cnt=0;

			}
			check=0;
		}
		System.out.println(max);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s= scan.next(); s scan.next() scan.next scan scan.close() scan.close scan int cnt=0; cnt 0 int max=0; max 0 int check=0; check 0 char acgt[] = {'A','C','G','T'}; acgt {'A','C','G','T'} 'A' 'C' 'G' 'T' for(int i=0;i<s.length();i++) {
			for(int j=0;j<4;j++) {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			}
			if(check==0||i==s.length()-1) {
				if(max<cnt)max=cnt;
				cnt=0;

			}
			check=0;
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			for(int j=0;j<4;j++) {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			}
			if(check==0||i==s.length()-1) {
				if(max<cnt)max=cnt;
				cnt=0;

			}
			check=0;
		} {
			for(int j=0;j<4;j++) {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			}
			if(check==0||i==s.length()-1) {
				if(max<cnt)max=cnt;
				cnt=0;

			}
			check=0;
		} for(int j=0;j<4;j++) {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			} int j=0; int j=0; j 0 j<4 j 4 j++ j++ j {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			} {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			} if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				} acgt[j]==s.charAt(i) acgt[j] acgt j s.charAt(i) s.charAt s i {
					cnt++;
					check=1;
					break;
				} cnt++ cnt check=1 check 1 break; if(check==0||i==s.length()-1) {
				if(max<cnt)max=cnt;
				cnt=0;

			} check==0||i==s.length()-1 check==0 check 0 i==s.length()-1 i s.length()-1 s.length() s.length s 1 {
				if(max<cnt)max=cnt;
				cnt=0;

			} if(max<cnt)max=cnt; max<cnt max cnt max=cnt max cnt cnt=0 cnt 0 check=0 check 0 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 scan = new Scanner(System.in);
		String s= scan.next();
		scan.close();
		int cnt=0;
		int max=0;
		int check=0;
		char acgt[] = {'A','C','G','T'};
		for(int i=0;i<s.length();i++) {
			for(int j=0;j<4;j++) {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			}
			if(check==0||i==s.length()-1) {
				if(max<cnt)max=cnt;
				cnt=0;

			}
			check=0;
		}
		System.out.println(max);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s= scan.next();
		scan.close();
		int cnt=0;
		int max=0;
		int check=0;
		char acgt[] = {'A','C','G','T'};
		for(int i=0;i<s.length();i++) {
			for(int j=0;j<4;j++) {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			}
			if(check==0||i==s.length()-1) {
				if(max<cnt)max=cnt;
				cnt=0;

			}
			check=0;
		}
		System.out.println(max);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s= scan.next();
		scan.close();
		int cnt=0;
		int max=0;
		int check=0;
		char acgt[] = {'A','C','G','T'};
		for(int i=0;i<s.length();i++) {
			for(int j=0;j<4;j++) {
				if(acgt[j]==s.charAt(i)) {
					cnt++;
					check=1;
					break;
				}
			}
			if(check==0||i==s.length()-1) {
				if(max<cnt)max=cnt;
				cnt=0;

			}
			check=0;
		}
		System.out.println(max);
	}
}