
s = gets.chomp
i = 0
cnt = 0
array = []
while i <= s.length-1
  if s[i] == "A" || s[i] == "C" || s[i] == "G" || s[i] == "T"
    s[i] = "."
    cnt += 1
  else
    s[i] = "#"
    array << cnt
    cnt = 0
  end
  if i == s.length-1
    array << cnt
  end
  i += 1
end

puts array.max