import java.util.*;
import java.math.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int num = S.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<num; i++) {
      String str = S.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")) {
        count++;
      	if(max < count) {
        	max = count;
      	}
      } else {
        count = 0;
      }

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

    }
   System.out.println(max);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int num = S.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<num; i++) {
      String str = S.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")) {
        count++;
      	if(max < count) {
        	max = count;
      	}
      } else {
        count = 0;
      }

    }
   System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int num = S.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<num; i++) {
      String str = S.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")) {
        count++;
      	if(max < count) {
        	max = count;
      	}
      } else {
        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 int num = S.length(); num S.length() S.length S int max = 0; max 0 int count = 0; count 0 for(int i=0; i<num; i++) {
      String str = S.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")) {
        count++;
      	if(max < count) {
        	max = count;
      	}
      } else {
        count = 0;
      }

    } int i=0; int i=0; i 0 i<num i num i++ i++ i {
      String str = S.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")) {
        count++;
      	if(max < count) {
        	max = count;
      	}
      } else {
        count = 0;
      }

    } {
      String str = S.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")) {
        count++;
      	if(max < count) {
        	max = count;
      	}
      } else {
        count = 0;
      }

    } String str = S.substring(i,i+1); str S.substring(i,i+1) S.substring S i i+1 i 1 if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")) {
        count++;
      	if(max < count) {
        	max = count;
      	}
      } else {
        count = 0;
      } str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T") str.equals("G") str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T") str.equals("A") str.equals str "A" str.equals("C") str.equals str "C" str.equals("G") str.equals str "G" str.equals("T") str.equals str "T" {
        count++;
      	if(max < count) {
        	max = count;
      	}
      } count++ count if(max < count) {
        	max = count;
      	} max < count max count {
        	max = count;
      	} max = count max count {
        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();
    int num = S.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<num; i++) {
      String str = S.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")) {
        count++;
      	if(max < count) {
        	max = count;
      	}
      } else {
        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();
    int num = S.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<num; i++) {
      String str = S.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")) {
        count++;
      	if(max < count) {
        	max = count;
      	}
      } else {
        count = 0;
      }

    }
   System.out.println(max);
  }
} Main
import java.util.*;
import java.math.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int num = S.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<num; i++) {
      String str = S.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")) {
        count++;
      	if(max < count) {
        	max = count;
      	}
      } else {
        count = 0;
      }

    }
   System.out.println(max);
  }
}