#!/usr/bin/env ruby
s = gets.chomp

acgt = %w[A C G T]
ans = 0

10.times do |i|
  len = 0

  j = i
  while j < 10
    break unless acgt.include?(s[j])
    len += 1
    j += 1
  end

  ans = [ans, len].max
end

puts ans
