n, m, q = gets.split.map(&:to_i)
s = Array.new(n){|i| i}
a = gets.split.map(&:to_i)
q = gets.split.map(&:to_i)
cur = 0
a.each do |i|
  if i % 2 == 0
    s.delete_at(cur = (cur+i) % n)
  else 
    s.delete_at(cur = (cur-i+n) % n)
  end
  n -= 1
end
q.each do |i|
  if a.include?(i) then puts 1
  else puts 0
  end
end