Go: package main

import (
	"fmt"
)

func main() {
	var n int // こま数

	_, _ = fmt.Scan(&n)

	xa := make([]int, n) // こま座標

	for i:= 0;i < n ; i++ {
		_, _ = fmt.Scan(&xa[i])
	}

	var m int // 操作数

	_, _ = fmt.Scan(&m)

	ma := make([]int, m) // 操作対象

	for i:= 0;i < m ; i++ {
		_, _ = fmt.Scan(&ma[i])
	}

	for _, v := range calc(xa, ma) {
		fmt.Println(v)
	}
}

func calc(xa []int, ma []int) []int {
	for _, v := range ma {
		if xa[v-1] < 2019 {
			if  len(xa) != v {
				if xa[v]-1 != xa[v-1] {
					xa[v-1]++
				}
			} else {
				xa[v-1]++
			}
		}
	}
	return xa
}

Python: n=int(input())
s=list(map(int,input().split()))
m=int(input())
a=list(map(int,input().split()))

for i in a:
    x=s[i-1]+1
    if x in s:
        continue
    if x >2019:
        continue
    else:
        s[i-1]=x
for i in range(n):
    print(s[i])

Python: n = int(input())
x = list(map(int, input().split()))
m = int(input())
a = list(map(int, input().split()))

for i in a:
    if x[i-1]+1 in x or x[i-1] == 2019:
        pass
    else:
        x[i-1] += 1
for i in x:
    print(i)

Python: import random
import math
N = int(input())
X = list(map(int, input().split()))
M = int(input())
A = list(map(int, input().split()))


for i in range (M):
    if A[i] == N and (X[A[i]-1] != 2019): 
        X[A[i]-1]=1+X[A[i]-1]
    elif  X[A[i]-1]==2019:
        continue 
    elif X[A[i]-1]+1 != X[A[i]] :
        X[A[i]-1]+=1


for i in range (N):
    print(X[i])

Python: # coding: utf-8
# Your code here!
def keisan(a,b):
    
    if a>2019:
        return True
    
    i=0
    while i<len(b):
        if b[i]==a :
            return True
        i+=1
    
    return False
    


koma_kazu=int(input()) #3

koma=input().rstrip().split()
komaI=[int(s) for s in koma]  #2,3,6

idou_kazu=int(input()) #2

idou=input().rstrip().split()
idouI=[int(s) for s in idou] #1,3


i=0
while i<idou_kazu:
    #if komaI[idouI[i]-1]+1 in komaI==False:
    if keisan(komaI[idouI[i]-1]+1,komaI)==False:
        komaI[idouI[i]-1]+=1
    i+=1

i=0
while i<koma_kazu:
    print(komaI[i])
    i+=1

Python: num=int(input())
koma_n=input().split()
koma_n = [int(s) for s in koma_n]
times=int(input())
which=input().split()
which  = [int(s) for s in which]

for i in range(times):
    flag=0
    for j in range(which[i]-1,num):
        if koma_n[which[i]-1]+1==koma_n[j]:
          flag=1
          break
   
    if flag==0 and koma_n[which[i]-1]<=2018:
        koma_n[which[i]-1]+=1

for i in range(num):
    print(koma_n[i])

Python: N = input("")
X = input("").split(" ")
M = input("")
A = input("").split(" ")

for a in A:
    index = int(a) - 1
    if X[index] == "2019":
        continue
    if not str(int(X[index]) + 1) in X:
        X[index] = str(int(X[index]) + 1)
for x in X:
    print(x)

Python: n=int(input())
x=[int(i) for i in input().split()]

mas=[False]*2020
for i in x:
    mas[i]=True
m=int(input())
a=[int(i) for i in input().split()]

for i in range(m):
    now=x[a[i]-1]
    if now==2019:
        continue
    elif mas[now+1]:
        continue
    mas[now],mas[now+1]=False,True
    x[a[i]-1]+=1

for i in range(2020):
    if mas[i]:
        print(i)

Python: n = int(input())
x = list(map(int,input().split()))
m = int(input())
a = list(map(int,input().split()))

x.insert(0,0)
a.insert(0,0)

for i in range(1,m+1):
    if x[a[i]] == 2019:
        pass
    elif a[i] == n:
        x[a[i]] = x[a[i]]+1
    elif x[a[i]]+1 != x[a[i]+1]:
        x[a[i]] = x[a[i]]+1


x.pop(0)
print(*x,sep = '\n')

Python: # -*- coding: utf-8 -*-
# 学籍番号 17D8101029G 石塚 博之 ID: mcatpolo 言語: python3

N = int(input())
X = list(map(int, input().split()))
M = int(input())
A = list(map(int, input().split()))



for i in range(0, M):
    if X[A[i]-1]+1 not in X and X[A[i]-1] < 2019:
        X[A[i]-1] += 1

for i in X:
    print(i)

Python: n = int(input())
x = list(map(int, input().split()))
m = int(input())
a = list(map(int, input().split()))

for mi in a:
    if x[mi-1] + 1 in x:
        pass
    else :
        x[mi-1] = min(2019, x[mi-1] + 1)

for i in x:
    print(i)

Python: N=int(input())

X=list(map(int,input().split()))

M=int(input())

A=list(map(int,input().split()))

for i in A:

    if ( (X[i-1]+1) in X) or (X[i-1]==2019):
        pass
    else:
        X[i-1]+=1

for i in range(N):
    print(X[i])

Python: N = int(input())
X_N = [int(i) for i in input().split()]
M = int(input())
A_M = [int(i) for i in input().split()]

for i in range(0, M):
    if (X_N[A_M[i]-1] != 2019) and ((A_M[i] == N) or (X_N[A_M[i]] != X_N[A_M[i]-1] + 1)):
        X_N[A_M[i]-1] += 1
        
for i in range(0, N):
    print(X_N[i])

Python: N = int(input())
X = [int(i) for i in input().split(' ')]
M = int(input())
A = [int(i) for i in input().split(' ')]

GOAL = 2019


for a in A:
    if len(X) > a and (X[a-1] + 1) == X[a]:
        continue
    if X[a-1] == GOAL:
        continue
    X[a-1] = X[a-1] + 1
    
for x in X:
    print(x)

Python: N=int(input())
X=list(map(int,input().split()))
M=int(input())
A=list(map(int,input().split()))
A=[A[i]-1 for i in range(len(A))]

for i in range(M):
    l=A[i]
    if X[l]+1 not in X and X[l]!=2019:
        X[l]+=1
print(format("\n".join(map(str,X))))

Python: n = int(input())
x = list(map(int, input().split()))

goal = 2019

v = [i in x for i in range(goal+1)]

int(input())
for a in map(int, input().split()):
    count = 0
    for i in range(goal + 1):
        if v[i]:
            count += 1
            if count == a:
                break

    if i < goal and v[i + 1] is False:
        v[i] = False
        v[i+1] = True

for i in range(goal + 1):
    if v[i]:
        print(i)

Python: 
def solve():
    N = int(input())
    X = [int(i) for i in input().split()]
    M = int(input())
    A = [int(i) for i in input().split()]
    for a in A:
        if not X[a - 1] + 1 in X:
            X[a - 1] = min(X[a - 1] + 1, 2019)
    for x in X:
        print(x)


if __name__ == '__main__':
    solve()

Python: a=int(input())
Xin=input().split( )
X=[int(Xin[i]) for i in range(a)]
 
X.append(2020)
b=int(input())
Ain=input().split( )
A=[int(Ain[i]) for i in range(b)]
 
for t in range(b):
    j=A[t]-1
    if X[j]<X[j+1]-1:
        X[j]+=1
for i in range(a):
    print(X[i])

Python: #! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys


def main():
    n = int(input())
    arrx = list(map(int,input().split()))
    m = input()
    arra = list(map(int,input().split()))
    for i in arra:
        if(i == n ):
            if(arrx[i-1] < 2019):
                arrx[i-1] += 1
        else:
            if(arrx[i-1] + 1 < arrx[i] and arrx[i-1] < 2019):
                arrx[i-1] += 1
    for i in arrx:
        print(i)

if __name__ == '__main__':
    main()

Python: n = int(input())
x = list(map(int, input().split())) + [2020]
m = int(input())
for i in map(int, input().split()): x[i-1]=min(x[i-1]+1,x[i]-1)
for i in range(n): print(x[i])

Python: n = int(input())
d = {i+1: v for i, v in enumerate(list(map(int, input().split())))}
m = int(input())
a = list(map(int, input().split()))

for i in a:
    if d[i]+1 not in d.values() and d[i] != 2019:
        d[i] += 1

print(*d.values(), sep="\n")

Python: input()
*X,=map(int,input().split())
input()
for a in map(int,input().split()):
    a-=1
    if X[a]<2019 and X[a]+1 not in X:
        X[a]+=1
print(*X,sep="\n")

Python: n=int(input())
X=list(map(int,input().split()))
M=int(input())
A=list(map(int,input().split()))

for i in range (len(A)):
    for j in range(len(X)):
        cnt=0
        if A[i]==j+1:
            X[j]+=1
            for k in range (len(X)):
                if X[j]==X[k] and k!=j:
                    X[j]=X[j]-1
            if X[j]>2019:
                X[j]=X[j]-1
      
            
for i in range (len(X)):
    print(X[i])