text = gets.chomp
n = text.length
hels = ['A', 'T', 'G', 'C']
max = 0

n.times do |i|
    tmp = 0
    (i...n).each do |j|
        if hels.include?(text[j])
            tmp += 1
        else
            break
        end
    end
    max = tmp if max<tmp
end

p max