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

array = (0..n - 1).to_a

index = 0

gets.split.map(&:to_i).each do |val|
  index = val.odd? ? (array.size + index - val) % array.size : (array.size + index + val) % array.size
  array.delete_at(index)
end

gets.split.map(&:to_i).each do |val|
  puts (array.include? val) ? 1 : 0
end