import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for (int i=0; i<S.length(); i++){
			int count = 0;
			for (int j=i; j<S.length(); j++){
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			}
			if (count>ans){
				ans = count;
			}
		}
		System.out.println(ans);

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for (int i=0; i<S.length(); i++){
			int count = 0;
			for (int j=i; j<S.length(); j++){
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			}
			if (count>ans){
				ans = count;
			}
		}
		System.out.println(ans);

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for (int i=0; i<S.length(); i++){
			int count = 0;
			for (int j=i; j<S.length(); j++){
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			}
			if (count>ans){
				ans = count;
			}
		}
		System.out.println(ans);

	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for (int i=0; i<S.length(); i++){
			int count = 0;
			for (int j=i; j<S.length(); j++){
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			}
			if (count>ans){
				ans = count;
			}
		}
		System.out.println(ans);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int ans = 0; ans 0 for (int i=0; i<S.length(); i++){
			int count = 0;
			for (int j=i; j<S.length(); j++){
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			}
			if (count>ans){
				ans = 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 j=i; j<S.length(); j++){
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			}
			if (count>ans){
				ans = count;
			}
		} {
			int count = 0;
			for (int j=i; j<S.length(); j++){
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			}
			if (count>ans){
				ans = count;
			}
		} int count = 0; count 0 for (int j=i; j<S.length(); j++){
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			} int j=i; int j=i; j i j<S.length() j S.length() S.length S j++ j++ j {
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			} {
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			} if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				} S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T' S.charAt(j) == 'G' S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T' S.charAt(j) == 'A' S.charAt(j) S.charAt S j 'A' S.charAt(j) == 'C' S.charAt(j) S.charAt S j 'C' S.charAt(j) == 'G' S.charAt(j) S.charAt S j 'G' S.charAt(j) == 'T' S.charAt(j) S.charAt S j 'T' {
					count++;
				} count++ count {
					break;
				} break; if (count>ans){
				ans = count;
			} count>ans count ans {
				ans = count;
			} ans = count ans count System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for (int i=0; i<S.length(); i++){
			int count = 0;
			for (int j=i; j<S.length(); j++){
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			}
			if (count>ans){
				ans = count;
			}
		}
		System.out.println(ans);

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for (int i=0; i<S.length(); i++){
			int count = 0;
			for (int j=i; j<S.length(); j++){
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			}
			if (count>ans){
				ans = count;
			}
		}
		System.out.println(ans);

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for (int i=0; i<S.length(); i++){
			int count = 0;
			for (int j=i; j<S.length(); j++){
				if (S.charAt(j) == 'A' || S.charAt(j) == 'C'
						|| S.charAt(j) == 'G' || S.charAt(j) == 'T'){
					count++;
				}else{
					break;
				}
			}
			if (count>ans){
				ans = count;
			}
		}
		System.out.println(ans);

	}

}