PROGRAM ATCODER

implicit none
character(len=10) :: s
integer :: i,j
integer :: long(10)

read(*,*) s

long = 0
do i = 1, 10
  do j = i,10
    if ( s(j:j) == 'A' .or. s(j:j) == 'T' .or. s(j:j) == 'G' .or. s(j:j) == 'C' ) then
      long(i) = long(i) + 1
    else
      exit
    end if    
  end do
end do

write(*,'(i0)') maxval(long)

contains
!!!!!! サブルーチンは↓
!!!!!!

END PROGRAM ATCODER