#ABC122B_Atcoder.rb
s = gets.chomp.chars
idx1 = 0
idx2 = 0
max = 0

while idx2 < s.size
  if s[idx1..idx2].grep(/[ACGT]/).size == s[idx1..idx2].size
    max = s[idx1..idx2].size if max < s[idx1..idx2].size
    idx2 += 1
    #puts "OK max=#{max} #{s[idx1..idx2].grep(/[ACGT]/)}"
  else
    idx2 += 1
    idx1 = idx2
    #puts "NG"
  end
end
puts max
