#include <stdio.h>
int main(void){
  int len=0;
  int lenmax=0;
  char s[11],c;
  char *str;
  scanf("%s",s);
  str=s;
  while(c=*str++){
    if(c=='A'||c=='T'||c=='C'||c=='G')len++;
    else{
      len=0;
    }
    if(lenmax < len)lenmax = len;
  }
  printf("%d",lenmax);
  return 0;
}
