S = gets.chomp
max_len =0
(0..S.length-1).each do |x|
  y = x
  while S[y] == 'A' || S[y] == 'C' || S[y] == 'G' || S[y] == 'T' do
    y = y + 1
  end
  max_len = y-x if max_len < y-x
end
puts max_len
