program sample
    implicit none
    integer(8) ::a, b,c,i,j,m,n,k,a1,b1,c1
    
    character(len=10)::s
    character(len=1)::t
    read(*,*) s
    a=len_trim(s)
    b=0
    c=0
    do i=1,a
        t=s(i:i)
        if (t=='A' .or. t=='C' .or. t=='G' .or. t=='T') then
            b=b+1
        else
            if (b>c)then
                c=b
            end if
            b=0
        end if

    end do
    if (b>c)then
        c=b
    end if
    write(*,*)c
    stop
end program sample
  

