#include <iostream>

using namespace std;

int numbers[1000];
int main() {
	int x, y;
	cin >> x;
	cin >> y;
	int temp;
	for (int ii = 0; ii < x; ii++)
	{
		cin >> temp;
		if (temp != y) {
			cout << temp;
			cout << ' ';
		}
	}
}