program sample
  implicit none
  character(10) :: s
  integer :: slen,i
  integer,allocatable :: t(:)

  read(*,*) s
  s=trim(s)
  slen=len(s)
  allocate(t(0:slen))
  t=0
  
  do i=1,slen
     if(s(i:i)=='A'.or.s(i:i)=='C'.or.s(i:i)=='G'.or.s(i:i)=='T')then
        t(i)=t(i-1)+1
     else
        t(i)=0
     endif
  enddo

  write(*,*) maxval(t)

  stop
  
end program sample