import java.util.Scanner;

public class Main {
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String s=sc.next();
    String[] ss =s.split("",0);
    int max=0,index=0;
    for (String value : ss) {
      if (value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T")) {
        index++;
        max = Math.max(max, index);
      } else {
        max = Math.max(max, index);
        index = 0;
      }

    }
    System.out.println(max);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String s=sc.next();
    String[] ss =s.split("",0);
    int max=0,index=0;
    for (String value : ss) {
      if (value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T")) {
        index++;
        max = Math.max(max, index);
      } else {
        max = Math.max(max, index);
        index = 0;
      }

    }
    System.out.println(max);
  }
} Main public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String s=sc.next();
    String[] ss =s.split("",0);
    int max=0,index=0;
    for (String value : ss) {
      if (value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T")) {
        index++;
        max = Math.max(max, index);
      } else {
        max = Math.max(max, index);
        index = 0;
      }

    }
    System.out.println(max);
  } main {
    Scanner sc=new Scanner(System.in);
    String s=sc.next();
    String[] ss =s.split("",0);
    int max=0,index=0;
    for (String value : ss) {
      if (value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T")) {
        index++;
        max = Math.max(max, index);
      } else {
        max = Math.max(max, index);
        index = 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[] ss =s.split("",0); ss s.split("",0) s.split s "" 0 int max=0 max 0 index=0; index 0 for (String value : ss) {
      if (value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T")) {
        index++;
        max = Math.max(max, index);
      } else {
        max = Math.max(max, index);
        index = 0;
      }

    } String value ss {
      if (value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T")) {
        index++;
        max = Math.max(max, index);
      } else {
        max = Math.max(max, index);
        index = 0;
      }

    } {
      if (value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T")) {
        index++;
        max = Math.max(max, index);
      } else {
        max = Math.max(max, index);
        index = 0;
      }

    } if (value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T")) {
        index++;
        max = Math.max(max, index);
      } else {
        max = Math.max(max, index);
        index = 0;
      } value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T") value.equals("G") value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T") value.equals("A") value.equals value "A" value.equals("C") value.equals value "C" value.equals("G") value.equals value "G" value.equals("T") value.equals value "T" {
        index++;
        max = Math.max(max, index);
      } index++ index max = Math.max(max, index) max Math.max(max, index) Math.max Math max index {
        max = Math.max(max, index);
        index = 0;
      } max = Math.max(max, index) max Math.max(max, index) Math.max Math max index index = 0 index 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[] ss =s.split("",0);
    int max=0,index=0;
    for (String value : ss) {
      if (value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T")) {
        index++;
        max = Math.max(max, index);
      } else {
        max = Math.max(max, index);
        index = 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[] ss =s.split("",0);
    int max=0,index=0;
    for (String value : ss) {
      if (value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T")) {
        index++;
        max = Math.max(max, index);
      } else {
        max = Math.max(max, index);
        index = 0;
      }

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

public class Main {
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String s=sc.next();
    String[] ss =s.split("",0);
    int max=0,index=0;
    for (String value : ss) {
      if (value.equals("A") || value.equals("C") || value.equals("G") || value.equals("T")) {
        index++;
        max = Math.max(max, index);
      } else {
        max = Math.max(max, index);
        index = 0;
      }

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