n = int(input()) a = list(map(int,input().split())) x = int(input()) a.pop(x-1) for i in range(len(a)): print(a[i],end=" ")