#include using namespace std; int main() { for (unsigned n, x; cin >> n >> x;) { if (n == 0 and x == 0)break; vector v(n); for (auto &e:v) { cin >> e; } v.emplace_back(x); for (int i = n - 1; i >= 0; i--) {//插ε…₯ζŽ’εΊ if (v[i] <= v[i + 1]) break; swap(v[i], v[i + 1]); } for (auto &e:v) { cout << e << " "; } cout << endl; } return 0; }