def is_acgt(c)
  c == 'A' || c == 'C' || c == 'G' || c == 'T'
end

def main(argv)
  s = gets.chomp
  m = 0
  s.size.times do |left|
    (left...s.size).each do |right|
      ret = s[left..right].split('').find{|c| not is_acgt(c)}
      if ret == nil then
        m = [m, right - left + 1].max
      end
    end
  end
  puts m.to_s
end

if self.to_s == 'main' then
  main(ARGV)
end