import java.util.Scanner;
import java.util.ArrayList;

public class Main{

  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] array ;
    array = sc.next().split("");
    int a = calc(array);
    System.out.println(a);
  }


  static int calc(String[] s){
    int count =0;
    int max = 0;
    for(int i=0; i<s.length;i++){
      if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      }
      if(count>max){
        max = count;
      }
    }
    return max;
  }


} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main{

  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] array ;
    array = sc.next().split("");
    int a = calc(array);
    System.out.println(a);
  }


  static int calc(String[] s){
    int count =0;
    int max = 0;
    for(int i=0; i<s.length;i++){
      if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      }
      if(count>max){
        max = count;
      }
    }
    return max;
  }


} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] array ;
    array = sc.next().split("");
    int a = calc(array);
    System.out.println(a);
  } main {
    Scanner sc = new Scanner(System.in);
    String[] array ;
    array = sc.next().split("");
    int a = calc(array);
    System.out.println(a);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] array ; array array = sc.next().split("") array sc.next().split("") sc.next().split sc.next() sc.next sc "" int a = calc(array); a calc(array) calc array System.out.println(a) System.out.println System.out System System.out a String[] args args static int calc(String[] s){
    int count =0;
    int max = 0;
    for(int i=0; i<s.length;i++){
      if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      }
      if(count>max){
        max = count;
      }
    }
    return max;
  } calc {
    int count =0;
    int max = 0;
    for(int i=0; i<s.length;i++){
      if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      }
      if(count>max){
        max = count;
      }
    }
    return max;
  } int count =0; count 0 int max = 0; max 0 for(int i=0; i<s.length;i++){
      if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      }
      if(count>max){
        max = count;
      }
    } int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
      if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      }
      if(count>max){
        max = count;
      }
    } {
      if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      }
      if(count>max){
        max = count;
      }
    } if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      } s[i].equals("A") || s[i].equals("C") s[i].equals("A") s[i].equals s[i] s i "A" s[i].equals("C") s[i].equals s[i] s i "C" {
        count += 1;
      } count += 1 count 1 if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      } s[i].equals("T") || s[i].equals("G") s[i].equals("T") s[i].equals s[i] s i "T" s[i].equals("G") s[i].equals s[i] s i "G" {
        count += 1;
      } count += 1 count 1 {
        if(count>max){
          max = count;
        }
        count = 0;
      } if(count>max){
          max = count;
        } count>max count max {
          max = count;
        } max = count max count count = 0 count 0 if(count>max){
        max = count;
      } count>max count max {
        max = count;
      } max = count max count return max; max String[] s s public class Main{

  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] array ;
    array = sc.next().split("");
    int a = calc(array);
    System.out.println(a);
  }


  static int calc(String[] s){
    int count =0;
    int max = 0;
    for(int i=0; i<s.length;i++){
      if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      }
      if(count>max){
        max = count;
      }
    }
    return max;
  }


} public class Main{

  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] array ;
    array = sc.next().split("");
    int a = calc(array);
    System.out.println(a);
  }


  static int calc(String[] s){
    int count =0;
    int max = 0;
    for(int i=0; i<s.length;i++){
      if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      }
      if(count>max){
        max = count;
      }
    }
    return max;
  }


} Main
import java.util.Scanner;
import java.util.ArrayList;

public class Main{

  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] array ;
    array = sc.next().split("");
    int a = calc(array);
    System.out.println(a);
  }


  static int calc(String[] s){
    int count =0;
    int max = 0;
    for(int i=0; i<s.length;i++){
      if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      }
      if(count>max){
        max = count;
      }
    }
    return max;
  }


}