n = int(input()) b = list(map(int, input().split())) c = int(input()) b.pop(c-1) print(' '.join(map(str,b)))