str1 = ["A", "C", "G", "T"]
s = gets.chomp
result = ""
s.each_char { |ch|
  if str1.include?(ch) == true
    result = result + "1"
  else
    result = result + "0"
  end
}
sepstr = result.split("0")
sepstr << ""
puts sepstr.max.length
