ans = 0
str = gets.chomp
n = str.size
for i in 0..str.size-1
    for j in i..str.size-1
        if str[i..j] =~ /^[A|C|G|T]+$/
            ans = [ans, str[i..j].size].max
        end
    end
end

puts ans
