s = gets.chomp.chars
a = ["A","C","G","T"]
max = 0

(0..s.size - 1).each do |i|
  sum = 0
  count = i
  dec = true
  while dec
    case s[count]
    when "A", "C", "G", "T"
      sum += 1
      count += 1
    else
      dec = false
    end
  end
  max = sum if max < sum
end

p max
