require "set"

S = gets.chomp

acgt = Set["A", "C", "G", "T"]
ans = 0

0.upto(S.length - 1).each do |i|
  cnt = 0
  i.upto(S.length - 1).each do |j|
    break unless acgt.include?(S[j])
    cnt += 1
  end
  ans = [ans, cnt].max
end
puts ans
