class Stack
  def initialize
    @sz = 0
    @elem = []
  end

  def push obj
    @elem << obj
    @sz += 1
  end

  # returns obj or nil if the stack is empty                                                                                                                 
  def pop
    obj = @elem.last
    @sz -= 1 if @sz > 0
    @elem = @elem[0..-2]
    obj
  end

  def peak
    obj = @elem.last
    obj
  end

  def empty?
    @sz == 0
  end
end


def main
  while num = gets
    num = num.chomp.to_i
    break if num == 0
    arr = gets.chomp.split(/\s/).collect { |x| x.to_i}
    stack = Stack.new
    stack.push arr[0]
    (1..arr.size - 1).each do |i|
      if stack.empty?
        stack.push arr[i]
      else
        elem = stack.peak
        if arr[i] == elem
          stack.push arr[i]
        else
          stack.pop
        end
      end  
    end  

    if stack.empty?
      puts "NO COLOR"
    else
      puts stack.peak
    end
  end  
end

main