import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    String S = s.nextLine();
    int count = 0,ans = 0;

    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T'){
        count++;
        if(ans < count){
          ans = count;
        }
      }
      else{
        count = 0;
      }
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    String S = s.nextLine();
    int count = 0,ans = 0;

    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T'){
        count++;
        if(ans < count){
          ans = count;
        }
      }
      else{
        count = 0;
      }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    String S = s.nextLine();
    int count = 0,ans = 0;

    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T'){
        count++;
        if(ans < count){
          ans = count;
        }
      }
      else{
        count = 0;
      }
    }
    System.out.println(ans);
  } main {
    Scanner s = new Scanner(System.in);
    String S = s.nextLine();
    int count = 0,ans = 0;

    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T'){
        count++;
        if(ans < count){
          ans = count;
        }
      }
      else{
        count = 0;
      }
    }
    System.out.println(ans);
  } Scanner s = new Scanner(System.in); s new Scanner(System.in) String S = s.nextLine(); S s.nextLine() s.nextLine s int count = 0 count 0 ans = 0; ans 0 for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T'){
        count++;
        if(ans < count){
          ans = count;
        }
      }
      else{
        count = 0;
      }
    } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
      if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T'){
        count++;
        if(ans < count){
          ans = count;
        }
      }
      else{
        count = 0;
      }
    } {
      if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T'){
        count++;
        if(ans < count){
          ans = count;
        }
      }
      else{
        count = 0;
      }
    } if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T'){
        count++;
        if(ans < count){
          ans = count;
        }
      }
      else{
        count = 0;
      } S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' S.charAt(i) == 'G' S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' S.charAt(i) == 'A' S.charAt(i) S.charAt S i 'A' S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' S.charAt(i) == 'G' S.charAt(i) S.charAt S i 'G' S.charAt(i) == 'T' S.charAt(i) S.charAt S i 'T' {
        count++;
        if(ans < count){
          ans = count;
        }
      } count++ count if(ans < count){
          ans = count;
        } ans < count ans count {
          ans = count;
        } ans = count ans count {
        count = 0;
      } count = 0 count 0 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 s = new Scanner(System.in);
    String S = s.nextLine();
    int count = 0,ans = 0;

    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T'){
        count++;
        if(ans < count){
          ans = count;
        }
      }
      else{
        count = 0;
      }
    }
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    String S = s.nextLine();
    int count = 0,ans = 0;

    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T'){
        count++;
        if(ans < count){
          ans = count;
        }
      }
      else{
        count = 0;
      }
    }
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    String S = s.nextLine();
    int count = 0,ans = 0;

    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T'){
        count++;
        if(ans < count){
          ans = count;
        }
      }
      else{
        count = 0;
      }
    }
    System.out.println(ans);
  }
}
