#!/usr/bin/ruby
# encoding: utf-8

S = gets.chomp

flg = 0
flgmax = 0

def isACGT c
  if (c == 'A') || (c == 'C') || (c == 'G') || (c == 'T') then
    return true
  end
  
  return false
end

(0..S.length-1).each do |i|

  if isACGT(S[i]) == true then 
    flg += 1

    if flgmax < flg 
      flgmax = flg
    end

  else
    flg = 0
  end
end

puts flgmax
