import java.io.*;
import java.util.*;

class Main {

	public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int a = 0;
		Set<Character> valid = new HashSet<>(Arrays.asList('A', 'G', 'C', 'T'));
		for (int i = 0; i < s.length(); i++) {
			int count = 0;
			int j = i;
			while (j < s.length() && valid.contains(s.charAt(j++))) count++;
			a = Math.max(a, count);
		}

		System.out.println(a);
	}
} import java.io.*; io.* java import java.util.*; util.* java class Main {

	public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int a = 0;
		Set<Character> valid = new HashSet<>(Arrays.asList('A', 'G', 'C', 'T'));
		for (int i = 0; i < s.length(); i++) {
			int count = 0;
			int j = i;
			while (j < s.length() && valid.contains(s.charAt(j++))) count++;
			a = Math.max(a, count);
		}

		System.out.println(a);
	}
} Main public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int a = 0;
		Set<Character> valid = new HashSet<>(Arrays.asList('A', 'G', 'C', 'T'));
		for (int i = 0; i < s.length(); i++) {
			int count = 0;
			int j = i;
			while (j < s.length() && valid.contains(s.charAt(j++))) count++;
			a = Math.max(a, count);
		}

		System.out.println(a);
	} main {
		final Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int a = 0;
		Set<Character> valid = new HashSet<>(Arrays.asList('A', 'G', 'C', 'T'));
		for (int i = 0; i < s.length(); i++) {
			int count = 0;
			int j = i;
			while (j < s.length() && valid.contains(s.charAt(j++))) count++;
			a = Math.max(a, count);
		}

		System.out.println(a);
	} final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int a = 0; a 0 Set<Character> valid = new HashSet<>(Arrays.asList('A', 'G', 'C', 'T')); valid new HashSet<>(Arrays.asList('A', 'G', 'C', 'T')) for (int i = 0; i < s.length(); i++) {
			int count = 0;
			int j = i;
			while (j < s.length() && valid.contains(s.charAt(j++))) count++;
			a = Math.max(a, count);
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			int count = 0;
			int j = i;
			while (j < s.length() && valid.contains(s.charAt(j++))) count++;
			a = Math.max(a, count);
		} {
			int count = 0;
			int j = i;
			while (j < s.length() && valid.contains(s.charAt(j++))) count++;
			a = Math.max(a, count);
		} int count = 0; count 0 int j = i; j i while (j < s.length() && valid.contains(s.charAt(j++))) count++; j < s.length() && valid.contains(s.charAt(j++)) j < s.length() j s.length() s.length s valid.contains(s.charAt(j++)) valid.contains valid s.charAt(j++) s.charAt s j++ j count++ count a = Math.max(a, count) a Math.max(a, count) Math.max Math a count System.out.println(a) System.out.println System.out System System.out a String[] args args
import java.io.*;
import java.util.*;

class Main {

	public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int a = 0;
		Set<Character> valid = new HashSet<>(Arrays.asList('A', 'G', 'C', 'T'));
		for (int i = 0; i < s.length(); i++) {
			int count = 0;
			int j = i;
			while (j < s.length() && valid.contains(s.charAt(j++))) count++;
			a = Math.max(a, count);
		}

		System.out.println(a);
	}
}
