s = gets.chomp.split('')

maxCount = 0
acgt = ''
count = 0
tmp_str = ''
s.each do |c|
  if ['A','T','G','C'].include?(c)
    count += 1
    tmp_str += c
  else
    if maxCount < count
      maxCount = count
      acgt = tmp_str
    end
    tmp_str = ''
    count = 0
  end
end

puts acgt.size