line = gets.chomp.split
N = line[0].to_i
M = line[1].to_i
Q = line[2].to_i

students = Array.new N do |i|
  i
end

array_a = gets.chomp.split
array_a.map! do |a|
  a.to_i
end
baton = 0

array_a.each do |a|
  if a.even?
  baton += a
  else
    baton -= a
  end

  size = students.size

  baton = (baton + size) % size
  students.delete_at baton
end

gets.chomp.split.each do |q|
  if students.include? q.to_i
    puts 1
  else
    puts 0
  end
end