ss = gets.chomp.split("")
maxCnt = 0
tmpCnt = 0
ss.each do |s|
    if !(s == "A" || s == "C" || s == "G" || s == "T")
        tmpCnt = 0
        next
    end
    tmpCnt += 1
    if maxCnt < tmpCnt
        maxCnt = tmpCnt
    end
end
puts maxCnt