n=int(input())
books=list(map(int,input().split()))

new_book=int(input())
index=int(input())

books.insert(index,new_book)

for b in books:
print(b,end"")