import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int prt=0;
		for(int i=0;i<s.length;i++){
			int cnt=0;
			for(int j=0;j<s.length-i;j++){
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			}
			if(cnt>prt)prt=cnt;
		}
		System.out.print(prt);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int prt=0;
		for(int i=0;i<s.length;i++){
			int cnt=0;
			for(int j=0;j<s.length-i;j++){
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			}
			if(cnt>prt)prt=cnt;
		}
		System.out.print(prt);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int prt=0;
		for(int i=0;i<s.length;i++){
			int cnt=0;
			for(int j=0;j<s.length-i;j++){
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			}
			if(cnt>prt)prt=cnt;
		}
		System.out.print(prt);
	} main {
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int prt=0;
		for(int i=0;i<s.length;i++){
			int cnt=0;
			for(int j=0;j<s.length-i;j++){
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			}
			if(cnt>prt)prt=cnt;
		}
		System.out.print(prt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] s = sc.next().split(""); s sc.next().split("") sc.next().split sc.next() sc.next sc "" int prt=0; prt 0 for(int i=0;i<s.length;i++){
			int cnt=0;
			for(int j=0;j<s.length-i;j++){
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			}
			if(cnt>prt)prt=cnt;
		} int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
			int cnt=0;
			for(int j=0;j<s.length-i;j++){
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			}
			if(cnt>prt)prt=cnt;
		} {
			int cnt=0;
			for(int j=0;j<s.length-i;j++){
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			}
			if(cnt>prt)prt=cnt;
		} int cnt=0; cnt 0 for(int j=0;j<s.length-i;j++){
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			} int j=0; int j=0; j 0 j<s.length-i j s.length-i s.length s s.length i j++ j++ j {
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			} {
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			} boolean t = false; t false switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				} s[i+j] s i+j i j case "A": "A" case "A": cnt++ cnt break; case "T": "T" case "T": cnt++ cnt break; case "C": "C" case "C": cnt++ cnt break; case "G": "G" case "G": cnt++ cnt break; default: default: t=true t true break; if(t)break; t break; if(cnt>prt)prt=cnt; cnt>prt cnt prt prt=cnt prt cnt System.out.print(prt) System.out.print System.out System System.out prt String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int prt=0;
		for(int i=0;i<s.length;i++){
			int cnt=0;
			for(int j=0;j<s.length-i;j++){
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			}
			if(cnt>prt)prt=cnt;
		}
		System.out.print(prt);
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int prt=0;
		for(int i=0;i<s.length;i++){
			int cnt=0;
			for(int j=0;j<s.length-i;j++){
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			}
			if(cnt>prt)prt=cnt;
		}
		System.out.print(prt);
	}
} Main
import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int prt=0;
		for(int i=0;i<s.length;i++){
			int cnt=0;
			for(int j=0;j<s.length-i;j++){
				boolean t = false;
				switch(s[i+j]){
				case "A":
					cnt++;
					break;
				case "T":
					cnt++;
					break;
				case "C":
					cnt++;
					break;
				case "G":
					cnt++;
					break;
				default:
					t=true;
					break;
				}
				if(t)break;
			}
			if(cnt>prt)prt=cnt;
		}
		System.out.print(prt);
	}
}