character(10) :: s
logical :: flg
integer :: n, ans, i,j,k

read *,s
n = len_trim(s)

ans = 0
do i = 1,n
   do j = i,n
      flg = .true.
      do k = i, j
         if (.not. isAGTC(s(k:k))) then
            flg = .false.
            exit
         endif
      enddo
      if (flg) then
         if (ans < j-i+1) then
            ans = j-i+1
         endif
      endif
   enddo
enddo

print '(i0)',ans
stop

contains
logical function isAGTC (c)
   character(1) :: c
   isAGTC = .false.
   if (c == 'A' .or. c == 'G' .or. c == 'T' .or. c == 'C') isAGTC = .true.
   return
end function isAGTC

end