program main
  implicit none
  integer :: i, j, n, res
  character(10) :: s
  read (*, *) s
  n = len(trim(s))

  res = 0
  outer: do i = 1, n
    do j = i, n
      if (.not. (s(j:j) == "A" .or. s(j:j) == "C" .or. s(j:j) == "G" .or. s(j:j) == "T")) cycle outer
      res = max(res, j - i + 1)
    end do
  end do outer

  write (*, "(i0)") res
end program main
