import 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 max = 0;
    int now = 0;
    for(int i = 0;i<n;i++){
      now = 0;
      for(int j = i + 1;j<=n;j++){
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      }
      if(max < now){
        max = now;
      }
    }
    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 n = s.length();
    int max = 0;
    int now = 0;
    for(int i = 0;i<n;i++){
      now = 0;
      for(int j = i + 1;j<=n;j++){
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      }
      if(max < now){
        max = now;
      }
    }
    System.out.println(max);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int max = 0;
    int now = 0;
    for(int i = 0;i<n;i++){
      now = 0;
      for(int j = i + 1;j<=n;j++){
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      }
      if(max < now){
        max = now;
      }
    }
    System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int max = 0;
    int now = 0;
    for(int i = 0;i<n;i++){
      now = 0;
      for(int j = i + 1;j<=n;j++){
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      }
      if(max < now){
        max = now;
      }
    }
    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 n = s.length(); n s.length() s.length s int max = 0; max 0 int now = 0; now 0 for(int i = 0;i<n;i++){
      now = 0;
      for(int j = i + 1;j<=n;j++){
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      }
      if(max < now){
        max = now;
      }
    } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
      now = 0;
      for(int j = i + 1;j<=n;j++){
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      }
      if(max < now){
        max = now;
      }
    } {
      now = 0;
      for(int j = i + 1;j<=n;j++){
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      }
      if(max < now){
        max = now;
      }
    } now = 0 now 0 for(int j = i + 1;j<=n;j++){
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      } int j = i + 1; int j = i + 1; j i + 1 i 1 j<=n j n j++ j++ j {
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      } {
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      } String ss = s.substring(j-1,j); ss s.substring(j-1,j) s.substring s j-1 j 1 j if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        } ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T") ss.equals("G") ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T") ss.equals("A") ss.equals ss "A" ss.equals("C") ss.equals ss "C" ss.equals("G") ss.equals ss "G" ss.equals("T") ss.equals ss "T" {
          now++;
          continue;
        } now++ now continue; {
          break;
        } break; if(max < now){
        max = now;
      } max < now max now {
        max = now;
      } max = now max now 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 n = s.length();
    int max = 0;
    int now = 0;
    for(int i = 0;i<n;i++){
      now = 0;
      for(int j = i + 1;j<=n;j++){
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      }
      if(max < now){
        max = now;
      }
    }
    System.out.println(max);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int max = 0;
    int now = 0;
    for(int i = 0;i<n;i++){
      now = 0;
      for(int j = i + 1;j<=n;j++){
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      }
      if(max < now){
        max = now;
      }
    }
    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 n = s.length();
    int max = 0;
    int now = 0;
    for(int i = 0;i<n;i++){
      now = 0;
      for(int j = i + 1;j<=n;j++){
        String ss = s.substring(j-1,j);
        if(ss.equals("A") || ss.equals("C") || ss.equals("G") || ss.equals("T")){
          now++;
          continue;
        }else{
          break;
        }
      }
      if(max < now){
        max = now;
      }
    }
    System.out.println(max);
  }
}
