S = gets
t = 0
renzoku = 0
renzokuMax = 0
for i in 0..S.size - 1
  if S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T'
    renzoku += 1
  elsif S[i] != 'A' || S[i] != 'C' || S[i] != 'G' || S[i] != 'T'
    if renzokuMax < renzoku
      renzokuMax = renzoku
    end
    renzoku = 0
  end
end
puts renzokuMax
