import sys
sys.setrecursionlimit(10000000)
input=lambda : sys.stdin.readline().rstrip()

n,x=map(int,input().split())
a=list(map(int,input().split()))
aa=list(filter(lambda b:b!=x,a))
print(*aa)
[((11, 42), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(10000000)'], {}), '(10000000)\n', (32, 42), False, 'import sys\n'), ((58, 78), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (76, 78), False, 'import sys\n')]