def match_ACGT(char)
    if char == 'A' || char == 'C' || char == 'G' || char == 'T'
        true
    else
        false
    end
end

S = gets.chomp!.split("")
tmp = Array.new
ans = 0
0.upto(S.length - 1) do |i|
    while(match_ACGT(S[i])) do 
        tmp << S[i]
        i += 1
    end
    ans = tmp.length if ans < tmp.length
    tmp.clear
end

puts ans