class Student
  attr_accessor :number
  def initialize(number)
    @number=number
  end
  def declare(a,n)  
    if a%2==0
      return (@number+a)%n
    else
      return (@number-a+n*n)%n
    end
  end
end

def check(c,b)
  for i in 0..c.length-1
    if c[i].number==b
      return 1
    end
  end
  return 0
end
def lose(a,c,n,current)
  x=c[current%n]
  y=x.declare(a,n)
  c.delete_at(y)
  if y==n-1
    return 0
  else
    return y
  end
end

  current=0  
  a=Array.new(200000)
  b=Array.new(1000)
  n,m,q=gets.split(" ").map(&:to_i)
  a=gets.split(" ").map(&:to_i)
  b=gets.split(" ").map(&:to_i)
  c=Array.new(n)
  for i in 0..n-1
    c[i]=Student.new(i)
  end
  for i in 0..m-1
    current=lose(a[i],c,n,current)
    n=n-1
  end
  for i in 0..q-1
    print check(c,b[i]),"\n"
  end

  