implicit none

character(10)s
integer:: counts=0,max_len=0
integer i,length

read(5,*) s

length=len_trim(s)

do i=1,length

if(s(i:i)=="A".or.s(i:i)=="C".or.s(i:i)=="G".or.s(i:i)=="T") then
counts=counts+1
max_len=max(max_len,counts)
else
 counts=0
endif

enddo

write(6,*) max_len







end