program main
  implicit none
  character(len=10) :: s
  integer :: i, j, l = 0

  read *, s

  do i = 1, 10
    do j = 10, i, -1
      if (verify(s(i:j), 'ATGC') .eq. 0) then 
        l = max(l, j-i+1)
        cycle
      end if
    end do
  end do

  print '(i0)', l

end program