def sizeAGCTString(str)
  temp = str.count("A") + str.count("G") + str.count("C") + str.count("T")
  return str.size == temp ? str.size : 0
end
n=gets.chomp
agct = [0]
n.size.times do |startIndex|
  str = n[startIndex]
  next if sizeAGCTString(str) == 0
  ((startIndex+1)...n.size).each do |endIndex|
    str = n[startIndex..endIndex]
    agct << sizeAGCTString(str)
  end
end
puts agct.max