program aaa
implicit none

integer :: l, i, res1, res2
character(1),dimension(4) :: g=['A','C','G','T']
character(10) :: s

read*, s
s=trim(s)
l=len_trim(s)
res1=0
res2=0
do i=1,l
if(s(i:i)==g(1).or.s(i:i)==g(2).or.&
&s(i:i)==g(3).or.s(i:i)==g(4)) then
res1=res1+1
else
res2=max(res1,res2)
res1=0
end if
end do

write(*,'(i0)') res2

end program