s = gets.chomp
max = 0
l = s.size
(0..s.size).each do |i|
  if m = /[ACGT]+/.match(s)
    size = m[0].size
    if max < size
      max = size
    end
  end
  if s == nil
    break
  end
  s = s[i..l]
end
puts max
