#!/usr/bin/env ruby
# require 'pry'

s = gets.chomp.split("")
ACGT=['A', 'C', 'G', 'T']
count=0
ary=[]
s.map do |ele|
  if ACGT.include?(ele)
    count += 1
  else
    ary << count
    count = 0
  end
end
puts ary.max
