
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] list = sc.next().toCharArray();
		boolean flag = false;
		int max = 0;
		int tmp = 0;
		for(int i = 0; i < list.length; i++) {
			if(list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G') {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} else {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			}
		}
		System.out.println(Math.max(max, tmp));
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] list = sc.next().toCharArray();
		boolean flag = false;
		int max = 0;
		int tmp = 0;
		for(int i = 0; i < list.length; i++) {
			if(list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G') {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} else {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			}
		}
		System.out.println(Math.max(max, tmp));
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] list = sc.next().toCharArray();
		boolean flag = false;
		int max = 0;
		int tmp = 0;
		for(int i = 0; i < list.length; i++) {
			if(list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G') {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} else {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			}
		}
		System.out.println(Math.max(max, tmp));
	} main {
		Scanner sc = new Scanner(System.in);
		char[] list = sc.next().toCharArray();
		boolean flag = false;
		int max = 0;
		int tmp = 0;
		for(int i = 0; i < list.length; i++) {
			if(list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G') {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} else {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			}
		}
		System.out.println(Math.max(max, tmp));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] list = sc.next().toCharArray(); list sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc boolean flag = false; flag false int max = 0; max 0 int tmp = 0; tmp 0 for(int i = 0; i < list.length; i++) {
			if(list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G') {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} else {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			}
		} int i = 0; int i = 0; i 0 i < list.length i list.length list list.length i++ i++ i {
			if(list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G') {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} else {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			}
		} {
			if(list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G') {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} else {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			}
		} if(list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G') {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} else {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			} list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G' list[i] == 'C' list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G' list[i] == 'A' list[i] list i 'A' list[i] == 'T' list[i] list i 'T' list[i] == 'C' list[i] list i 'C' list[i] == 'G' list[i] list i 'G' {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} if(!flag) {
					flag = true;
					tmp = 0;
				} !flag flag {
					flag = true;
					tmp = 0;
				} flag = true flag true tmp = 0 tmp 0 tmp++ tmp {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			} if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				} flag {
					flag = false;
					max = Math.max(max, tmp);
				} flag = false flag false max = Math.max(max, tmp) max Math.max(max, tmp) Math.max Math max tmp System.out.println(Math.max(max, tmp)) System.out.println System.out System System.out Math.max(max, tmp) Math.max Math max tmp String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] list = sc.next().toCharArray();
		boolean flag = false;
		int max = 0;
		int tmp = 0;
		for(int i = 0; i < list.length; i++) {
			if(list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G') {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} else {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			}
		}
		System.out.println(Math.max(max, tmp));
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] list = sc.next().toCharArray();
		boolean flag = false;
		int max = 0;
		int tmp = 0;
		for(int i = 0; i < list.length; i++) {
			if(list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G') {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} else {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			}
		}
		System.out.println(Math.max(max, tmp));
	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] list = sc.next().toCharArray();
		boolean flag = false;
		int max = 0;
		int tmp = 0;
		for(int i = 0; i < list.length; i++) {
			if(list[i] == 'A' || list[i] == 'T' || list[i] == 'C' || list[i] == 'G') {
				if(!flag) {
					flag = true;
					tmp = 0;
				}
				tmp++;
			} else {
				if(flag) {
					flag = false;
					max = Math.max(max, tmp);
				}
			}
		}
		System.out.println(Math.max(max, tmp));
	}

}
