import java.util.HashSet;
import java.util.Scanner;

class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力
		String ss = sc.next();
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');

		
		int ans = 0;
		int left = 0;
		int right = 1;
		
		while(left <= ss.length()){
			while(!set.contains(ss.charAt(left))){		//左端を動かす
				left++;
				if(left == ss.length()){
					break;
				}

			}

			if(left == ss.length()){
				break;
			}
			right = left;
			while(set.contains(ss.charAt(right))){
				right++;
				if(right == ss.length()){
					break;
				}
			}
			ans = Math.max(ans, right-left);
			
			left = right;
			if(left == ss.length()){
				break;
			}
			
		}
		
		System.out.print(ans);

	}


}


class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	}
}

 import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力
		String ss = sc.next();
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');

		
		int ans = 0;
		int left = 0;
		int right = 1;
		
		while(left <= ss.length()){
			while(!set.contains(ss.charAt(left))){		//左端を動かす
				left++;
				if(left == ss.length()){
					break;
				}

			}

			if(left == ss.length()){
				break;
			}
			right = left;
			while(set.contains(ss.charAt(right))){
				right++;
				if(right == ss.length()){
					break;
				}
			}
			ans = Math.max(ans, right-left);
			
			left = right;
			if(left == ss.length()){
				break;
			}
			
		}
		
		System.out.print(ans);

	}


} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力
		String ss = sc.next();
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');

		
		int ans = 0;
		int left = 0;
		int right = 1;
		
		while(left <= ss.length()){
			while(!set.contains(ss.charAt(left))){		//左端を動かす
				left++;
				if(left == ss.length()){
					break;
				}

			}

			if(left == ss.length()){
				break;
			}
			right = left;
			while(set.contains(ss.charAt(right))){
				right++;
				if(right == ss.length()){
					break;
				}
			}
			ans = Math.max(ans, right-left);
			
			left = right;
			if(left == ss.length()){
				break;
			}
			
		}
		
		System.out.print(ans);

	} main {
		Scanner sc = new Scanner(System.in);			//文字の入力
		String ss = sc.next();
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');

		
		int ans = 0;
		int left = 0;
		int right = 1;
		
		while(left <= ss.length()){
			while(!set.contains(ss.charAt(left))){		//左端を動かす
				left++;
				if(left == ss.length()){
					break;
				}

			}

			if(left == ss.length()){
				break;
			}
			right = left;
			while(set.contains(ss.charAt(right))){
				right++;
				if(right == ss.length()){
					break;
				}
			}
			ans = Math.max(ans, right-left);
			
			left = right;
			if(left == ss.length()){
				break;
			}
			
		}
		
		System.out.print(ans);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String ss = sc.next(); ss sc.next() sc.next sc HashSet<Character> set = new HashSet<Character>(); set new HashSet<Character>() set.add('A') set.add set 'A' set.add('C') set.add set 'C' set.add('G') set.add set 'G' set.add('T') set.add set 'T' int ans = 0; ans 0 int left = 0; left 0 int right = 1; right 1 while(left <= ss.length()){
			while(!set.contains(ss.charAt(left))){		//左端を動かす
				left++;
				if(left == ss.length()){
					break;
				}

			}

			if(left == ss.length()){
				break;
			}
			right = left;
			while(set.contains(ss.charAt(right))){
				right++;
				if(right == ss.length()){
					break;
				}
			}
			ans = Math.max(ans, right-left);
			
			left = right;
			if(left == ss.length()){
				break;
			}
			
		} left <= ss.length() left ss.length() ss.length ss {
			while(!set.contains(ss.charAt(left))){		//左端を動かす
				left++;
				if(left == ss.length()){
					break;
				}

			}

			if(left == ss.length()){
				break;
			}
			right = left;
			while(set.contains(ss.charAt(right))){
				right++;
				if(right == ss.length()){
					break;
				}
			}
			ans = Math.max(ans, right-left);
			
			left = right;
			if(left == ss.length()){
				break;
			}
			
		} while(!set.contains(ss.charAt(left))){		//左端を動かす
				left++;
				if(left == ss.length()){
					break;
				}

			} !set.contains(ss.charAt(left)) set.contains(ss.charAt(left)) set.contains set ss.charAt(left) ss.charAt ss left {		//左端を動かす
				left++;
				if(left == ss.length()){
					break;
				}

			} left++ left if(left == ss.length()){
					break;
				} left == ss.length() left ss.length() ss.length ss {
					break;
				} break; if(left == ss.length()){
				break;
			} left == ss.length() left ss.length() ss.length ss {
				break;
			} break; right = left right left while(set.contains(ss.charAt(right))){
				right++;
				if(right == ss.length()){
					break;
				}
			} set.contains(ss.charAt(right)) set.contains set ss.charAt(right) ss.charAt ss right {
				right++;
				if(right == ss.length()){
					break;
				}
			} right++ right if(right == ss.length()){
					break;
				} right == ss.length() right ss.length() ss.length ss {
					break;
				} break; ans = Math.max(ans, right-left) ans Math.max(ans, right-left) Math.max Math ans right-left right left left = right left right if(left == ss.length()){
				break;
			} left == ss.length() left ss.length() ss.length ss {
				break;
			} break; System.out.print(ans) System.out.print System.out System System.out ans String[] args args class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	}
} Pair int from; from int end; end @Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	} compareTo {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	} Pair otherpair = (Pair)other; otherpair (Pair)other return from - otherpair.from; from - otherpair.from from otherpair.from otherpair otherpair.from Object other other Comparable
import java.util.HashSet;
import java.util.Scanner;

class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力
		String ss = sc.next();
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');

		
		int ans = 0;
		int left = 0;
		int right = 1;
		
		while(left <= ss.length()){
			while(!set.contains(ss.charAt(left))){		//左端を動かす
				left++;
				if(left == ss.length()){
					break;
				}

			}

			if(left == ss.length()){
				break;
			}
			right = left;
			while(set.contains(ss.charAt(right))){
				right++;
				if(right == ss.length()){
					break;
				}
			}
			ans = Math.max(ans, right-left);
			
			left = right;
			if(left == ss.length()){
				break;
			}
			
		}
		
		System.out.print(ans);

	}


}


class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	}
}


