#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
int n, x;
cin >> n >> x;
int arr[n + 1];
for (int i = 0 ; i < n ; i++ ){
cin >> arr[i];
}
arr[n] = x;
sort(arr, arr + n + 1);
for (int i = 0 ; i < n + 1 ; i++ ){
cout << arr[i] << " ";
}
return 0;
}