s = gets.chomp.chars.map(&:to_s)
res = 0
res_arr = []
s.each do |i|
  if i == 'A' || i == 'C' || i == 'G' || i == 'T'
    res += 1
    res_arr << res
  else
    res = 0
    res_arr << 0
  end
end
puts res_arr.max