n, m, q = gets.split.map(&:to_i)

array = Array.new(n) { 1 }

c = 0

gets.split.map(&:to_i).each do |val|
  i = 0
  while i < val
    c = val.odd? ? (n + c - 1) % n : (n + c + 1) % n
    if array[c] == 1
      i += 1
    end
  end
  array[c] = 0
  c = (c + 1) % n
end

gets.split.map(&:to_i).each do |val|
  puts array[val]
end