import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int l=0;
    int ret=0;
    for(char c: S.toCharArray()){
      switch(c){
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          l++; break;
        default:
          l=0;
      }
      ret = Math.max(ret, l);
    }
    System.out.println(ret);
  }
} 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 l=0;
    int ret=0;
    for(char c: S.toCharArray()){
      switch(c){
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          l++; break;
        default:
          l=0;
      }
      ret = Math.max(ret, l);
    }
    System.out.println(ret);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int l=0;
    int ret=0;
    for(char c: S.toCharArray()){
      switch(c){
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          l++; break;
        default:
          l=0;
      }
      ret = Math.max(ret, l);
    }
    System.out.println(ret);
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int l=0;
    int ret=0;
    for(char c: S.toCharArray()){
      switch(c){
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          l++; break;
        default:
          l=0;
      }
      ret = Math.max(ret, l);
    }
    System.out.println(ret);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int l=0; l 0 int ret=0; ret 0 for(char c: S.toCharArray()){
      switch(c){
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          l++; break;
        default:
          l=0;
      }
      ret = Math.max(ret, l);
    } char c S.toCharArray() S.toCharArray S {
      switch(c){
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          l++; break;
        default:
          l=0;
      }
      ret = Math.max(ret, l);
    } {
      switch(c){
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          l++; break;
        default:
          l=0;
      }
      ret = Math.max(ret, l);
    } switch(c){
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          l++; break;
        default:
          l=0;
      } c case 'A': 'A' case 'A': case 'T': 'T' case 'T': case 'C': 'C' case 'C': case 'G': 'G' case 'G': l++ l break; default: default: l=0 l 0 ret = Math.max(ret, l) ret Math.max(ret, l) Math.max Math ret l System.out.println(ret) System.out.println System.out System System.out ret String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int l=0;
    int ret=0;
    for(char c: S.toCharArray()){
      switch(c){
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          l++; break;
        default:
          l=0;
      }
      ret = Math.max(ret, l);
    }
    System.out.println(ret);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int l=0;
    int ret=0;
    for(char c: S.toCharArray()){
      switch(c){
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          l++; break;
        default:
          l=0;
      }
      ret = Math.max(ret, l);
    }
    System.out.println(ret);
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int l=0;
    int ret=0;
    for(char c: S.toCharArray()){
      switch(c){
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          l++; break;
        default:
          l=0;
      }
      ret = Math.max(ret, l);
    }
    System.out.println(ret);
  }
}