require 'set'
class ListNode
    def initialize(val)
        @val = val
    end
    def link(v)
        self.next = v
        v.prev = self
    end
    attr_reader :val
    attr_accessor :next, :prev
end
n, m, q = gets.split.map(&:to_i)
nodes = (0..n-1).map {|i| ListNode.new(i)}
nodes.each_cons(2) {|u, v| u.link(v)}
nodes[-1].link(nodes[0])
v = nodes[0]
gets.split.map(&:to_i).each do |a|
    if a.even?
        a.times { v = v.next }
    else
        a.times { v = v.prev }
    end
    u = v.prev
    w = v.next
    u.link(w)
    v = w
end
rest = Set[v.val]
v0 = v
v = v.next
until v == v0
    rest << v.val
    v = v.next
end
gets.split.map(&:to_i).each do |q|
    puts rest.include?(q) ? ?1 : ?0
end
