N = gets.to_i
X = gets.split.map(&:to_i)
M = gets.to_i
A = gets.split.map(&:to_i)
A.each do |a|
    p_now = X[a-1]
    p_next = p_now + 1
    if p_next > 2019 then
    elsif X.include?(p_next) then
    else
        X[a-1] += 1
    end
end
X.each{|x| p x}
