import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int max = 0,count=0,len=s.length();
    for(int i = 0;i < len;i++){
      switch(s.charAt(i)){
        case 'A':
          count++;
          break;
        case 'T':
          count++;
          break;
        case 'G':
          count++;
          break;
        case 'C':
          count++;
          break;
        default:
          count=0;
      }
      if(max < count)max=count;
    }
    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();
    int max = 0,count=0,len=s.length();
    for(int i = 0;i < len;i++){
      switch(s.charAt(i)){
        case 'A':
          count++;
          break;
        case 'T':
          count++;
          break;
        case 'G':
          count++;
          break;
        case 'C':
          count++;
          break;
        default:
          count=0;
      }
      if(max < count)max=count;
    }
    System.out.println(max);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int max = 0,count=0,len=s.length();
    for(int i = 0;i < len;i++){
      switch(s.charAt(i)){
        case 'A':
          count++;
          break;
        case 'T':
          count++;
          break;
        case 'G':
          count++;
          break;
        case 'C':
          count++;
          break;
        default:
          count=0;
      }
      if(max < count)max=count;
    }
    System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int max = 0,count=0,len=s.length();
    for(int i = 0;i < len;i++){
      switch(s.charAt(i)){
        case 'A':
          count++;
          break;
        case 'T':
          count++;
          break;
        case 'G':
          count++;
          break;
        case 'C':
          count++;
          break;
        default:
          count=0;
      }
      if(max < count)max=count;
    }
    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 max = 0 max 0 count=0 count 0 len=s.length(); len s.length() s.length s for(int i = 0;i < len;i++){
      switch(s.charAt(i)){
        case 'A':
          count++;
          break;
        case 'T':
          count++;
          break;
        case 'G':
          count++;
          break;
        case 'C':
          count++;
          break;
        default:
          count=0;
      }
      if(max < count)max=count;
    } int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
      switch(s.charAt(i)){
        case 'A':
          count++;
          break;
        case 'T':
          count++;
          break;
        case 'G':
          count++;
          break;
        case 'C':
          count++;
          break;
        default:
          count=0;
      }
      if(max < count)max=count;
    } {
      switch(s.charAt(i)){
        case 'A':
          count++;
          break;
        case 'T':
          count++;
          break;
        case 'G':
          count++;
          break;
        case 'C':
          count++;
          break;
        default:
          count=0;
      }
      if(max < count)max=count;
    } switch(s.charAt(i)){
        case 'A':
          count++;
          break;
        case 'T':
          count++;
          break;
        case 'G':
          count++;
          break;
        case 'C':
          count++;
          break;
        default:
          count=0;
      } s.charAt(i) s.charAt s i case 'A': 'A' case 'A': count++ count break; case 'T': 'T' case 'T': count++ count break; case 'G': 'G' case 'G': count++ count break; case 'C': 'C' case 'C': count++ count break; default: default: count=0 count 0 if(max < count)max=count; max < count max count max=count max count 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 max = 0,count=0,len=s.length();
    for(int i = 0;i < len;i++){
      switch(s.charAt(i)){
        case 'A':
          count++;
          break;
        case 'T':
          count++;
          break;
        case 'G':
          count++;
          break;
        case 'C':
          count++;
          break;
        default:
          count=0;
      }
      if(max < count)max=count;
    }
    System.out.println(max);
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int max = 0,count=0,len=s.length();
    for(int i = 0;i < len;i++){
      switch(s.charAt(i)){
        case 'A':
          count++;
          break;
        case 'T':
          count++;
          break;
        case 'G':
          count++;
          break;
        case 'C':
          count++;
          break;
        default:
          count=0;
      }
      if(max < count)max=count;
    }
    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();
    int max = 0,count=0,len=s.length();
    for(int i = 0;i < len;i++){
      switch(s.charAt(i)){
        case 'A':
          count++;
          break;
        case 'T':
          count++;
          break;
        case 'G':
          count++;
          break;
        case 'C':
          count++;
          break;
        default:
          count=0;
      }
      if(max < count)max=count;
    }
    System.out.println(max);
  }
}