import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String X  = sc.next();
    String[] words = X.split("[^ATCG]+");
    int max = 0;
    for(String word : words){
      if(word.length() > max){
        max = word.length();
      }
    }
    System.out.print(max);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String X  = sc.next();
    String[] words = X.split("[^ATCG]+");
    int max = 0;
    for(String word : words){
      if(word.length() > max){
        max = word.length();
      }
    }
    System.out.print(max);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String X  = sc.next();
    String[] words = X.split("[^ATCG]+");
    int max = 0;
    for(String word : words){
      if(word.length() > max){
        max = word.length();
      }
    }
    System.out.print(max);
  } main {
    Scanner sc = new Scanner(System.in);
    String X  = sc.next();
    String[] words = X.split("[^ATCG]+");
    int max = 0;
    for(String word : words){
      if(word.length() > max){
        max = word.length();
      }
    }
    System.out.print(max);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String X  = sc.next(); X sc.next() sc.next sc String[] words = X.split("[^ATCG]+"); words X.split("[^ATCG]+") X.split X "[^ATCG]+" int max = 0; max 0 for(String word : words){
      if(word.length() > max){
        max = word.length();
      }
    } String word words {
      if(word.length() > max){
        max = word.length();
      }
    } {
      if(word.length() > max){
        max = word.length();
      }
    } if(word.length() > max){
        max = word.length();
      } word.length() > max word.length() word.length word max {
        max = word.length();
      } max = word.length() max word.length() word.length word System.out.print(max) System.out.print 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 X  = sc.next();
    String[] words = X.split("[^ATCG]+");
    int max = 0;
    for(String word : words){
      if(word.length() > max){
        max = word.length();
      }
    }
    System.out.print(max);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String X  = sc.next();
    String[] words = X.split("[^ATCG]+");
    int max = 0;
    for(String word : words){
      if(word.length() > max){
        max = word.length();
      }
    }
    System.out.print(max);
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String X  = sc.next();
    String[] words = X.split("[^ATCG]+");
    int max = 0;
    for(String word : words){
      if(word.length() > max){
        max = word.length();
      }
    }
    System.out.print(max);
  }
}
