program ATCoder
character*10::s
integer::i,l,count=0,ans=0
read*,s
l=len_trim(s)
!print*,l
do i=1,l
if(s(i:i)=='A'.or.s(i:i)=='T'.or.s(i:i)=='C'.or.s(i:i)=='G')then
count=count+1
else
if(count>ans)then
ans=count
count=0
else
count=0
end if
end if
end do

print*,ans
!print*,s

end program ATCoder