fun main(args: Array<String>) {

    val n = readLine()!!.toInt()
    var x = readLine()!!.split(" ").map(String::toInt).toMutableList()
    val m = readLine()!!.toInt()
    val a = readLine()!!.split(" ").map(String::toInt)

    val o = 2019

    for (i in 0..m-1) {

        if (a[i] >= n) {
            //一番右端のコマ確定
            if (x[a[i]-1] < o) {
                x[a[i]-1] = x[a[i]-1] + 1
            }
        } else {
            if (x[a[i]-1]+1 != x[a[i]]) {
                x[a[i]-1] = x[a[i]-1] + 1
            }    
        }
    }
    x.forEach {i ->  println(i)}
}
