hel=["A","C","G","T"]

#p hel
n = gets.chomp
x = n.chars
#p x
cnt = 0
for i in 0..x.length-1
    for j in 0..x.length-1
    c = 0
        for k in i..j
        #puts hel.include?(x[k])
            if hel.include?(x[k])
            c=(j-i+1)
            else
                c = 0
                break
            end
        end
        #c = (j-i)
        if cnt <= c
            cnt=c
        end
        #p cnt
    end
end

puts cnt