def acgt(s)
    continuous_acgt = 0
    
    s.chars.inject(0) {|res, i|
        case i
        when "A", "C", "G", "T" then
            continuous_acgt += 1
        else
            continuous_acgt = 0
        end
        
        res = [res, continuous_acgt].max
    }
end

puts acgt(gets.chomp)