import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for(int i = 0; i < n; i++){
      for(int j = n; j >= i;j--){
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      }
    }
    System.out.println(ans);
  }
} 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();
    int n = s.length();
    int ans = 0;
    for(int i = 0; i < n; i++){
      for(int j = n; j >= i;j--){
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for(int i = 0; i < n; i++){
      for(int j = n; j >= i;j--){
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      }
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for(int i = 0; i < n; i++){
      for(int j = n; j >= i;j--){
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      }
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int n = s.length(); n s.length() s.length s int ans = 0; ans 0 for(int i = 0; i < n; i++){
      for(int j = n; j >= i;j--){
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      for(int j = n; j >= i;j--){
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      }
    } {
      for(int j = n; j >= i;j--){
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      }
    } for(int j = n; j >= i;j--){
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      } int j = n; int j = n; j n j >= i j i j-- j-- j {
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      } {
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      } if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        } s.substring(i, j).matches("[ACGT]*") s.substring(i, j).matches s.substring(i, j) s.substring s i j "[ACGT]*" {
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        } int l = s.substring(i, j).length(); l s.substring(i, j).length() s.substring(i, j).length s.substring(i, j) s.substring s i j if(l > ans){
            ans = l;
          } l > ans l ans {
            ans = l;
          } ans = l ans l System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for(int i = 0; i < n; i++){
      for(int j = n; j >= i;j--){
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      }
    }
    System.out.println(ans);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for(int i = 0; i < n; i++){
      for(int j = n; j >= i;j--){
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      }
    }
    System.out.println(ans);
  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for(int i = 0; i < n; i++){
      for(int j = n; j >= i;j--){
        if(s.substring(i, j).matches("[ACGT]*")){
          int l = s.substring(i, j).length();
          if(l > ans){
            ans = l;
          }
        }
      }
    }
    System.out.println(ans);
  }
}