import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        String[] line = s.split("", 10);
        int count = 0;
        int max = 0;
        for(int i=0; i<line.length; i++){
          for(int j=0; j<line.length; j++){
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          }
          count = 0;
        }
		System.out.println(max);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        String[] line = s.split("", 10);
        int count = 0;
        int max = 0;
        for(int i=0; i<line.length; i++){
          for(int j=0; j<line.length; j++){
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          }
          count = 0;
        }
		System.out.println(max);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        String[] line = s.split("", 10);
        int count = 0;
        int max = 0;
        for(int i=0; i<line.length; i++){
          for(int j=0; j<line.length; j++){
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          }
          count = 0;
        }
		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        String[] line = s.split("", 10);
        int count = 0;
        int max = 0;
        for(int i=0; i<line.length; i++){
          for(int j=0; j<line.length; j++){
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          }
          count = 0;
        }
		System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String[] line = s.split("", 10); line s.split("", 10) s.split s "" 10 int count = 0; count 0 int max = 0; max 0 for(int i=0; i<line.length; i++){
          for(int j=0; j<line.length; j++){
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          }
          count = 0;
        } int i=0; int i=0; i 0 i<line.length i line.length line line.length i++ i++ i {
          for(int j=0; j<line.length; j++){
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          }
          count = 0;
        } {
          for(int j=0; j<line.length; j++){
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          }
          count = 0;
        } for(int j=0; j<line.length; j++){
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          } int j=0; int j=0; j 0 j<line.length j line.length line line.length j++ j++ j {
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          } {
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          } if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0; line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C") line[j].equals("G") line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C") line[j].equals("A") line[j].equals line[j] line j "A" line[j].equals("T") line[j].equals line[j] line j "T" line[j].equals("G") line[j].equals line[j] line j "G" line[j].equals("C") line[j].equals line[j] line j "C" {
              count++;
              if(count > max) {
           		 max = count;
              }
            } count++ count if(count > max) {
           		 max = count;
              } count > max count max {
           		 max = count;
              } max = count max count count = 0 count 0 count = 0 count 0 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        String[] line = s.split("", 10);
        int count = 0;
        int max = 0;
        for(int i=0; i<line.length; i++){
          for(int j=0; j<line.length; j++){
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          }
          count = 0;
        }
		System.out.println(max);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        String[] line = s.split("", 10);
        int count = 0;
        int max = 0;
        for(int i=0; i<line.length; i++){
          for(int j=0; j<line.length; j++){
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          }
          count = 0;
        }
		System.out.println(max);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        String[] line = s.split("", 10);
        int count = 0;
        int max = 0;
        for(int i=0; i<line.length; i++){
          for(int j=0; j<line.length; j++){
        	if(line[j].equals("A") || line[j].equals("T") || line[j].equals("G") || line[j].equals("C")) {
              count++;
              if(count > max) {
           		 max = count;
              }
            }
            else count = 0;
          }
          count = 0;
        }
		System.out.println(max);
	}
}