#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef unsigned long long ull; typedef long long ll; typedef unsigned int ui; struct Pair { int first; int second; Pair() {} Pair(int first, int second) :first(first), second(second) {} bool operator<(const Pair &other) const { return second < other.second; } bool operator>(const Pair &other) const { return second > other.second; } }; struct Tuple { ll a; ll b; ll c; int index; Tuple() {} Tuple(ll a, ll b, ll c, int index) { this->a = min(a, min(b, c)); this->c = max(a, max(b, c)); this->b = a + b + c - this->a - this->c; this->index = index; } bool operator<(const Tuple &other) const { if (c != other.c) return c < other.c; if (b != other.b) return b < other.b; return a < other.a; } bool operator>(const Tuple &other) const { return !(*this < other); } }; struct Wrap { int* index; Wrap(int* index) : index(index) {} bool operator<(const Wrap&other) const { return (*index) < (*other.index); } bool operator>(const Wrap&other) const { return (*index) > (*other.index); } }; int ini() { int result; scanf("%d", &result); return result; } ll inl() { ll result; scanf("%I64d", &result); return result; } char inc() { char result; scanf(" %c", &result); return result; } double ind() { double result; scanf("%lf", &result); return result; } void swap(int &a, int &b) { int temp = a; a = b; b = temp; } int modul(int a) { return a < 0 ? -a : a; } int n, m, k, t, u, v, j, i, x1, y11, x2, y2; const ll MODULO = 1000000007; char ch; double d; int arr[100002]; int main() { freopen("add.in", "r", stdin); freopen("add.out", "w", stdout); n = ini(); m = ini(); for (int i = 0; i < n; i++) { arr[i] = ini(); } int total = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] > arr[j]) { total++; } } } int ind = n - (m - total); if (total > m || ind < 0) { printf("Impossible"); } else { for (int i = 0; i <= n; i++) { if (i == ind) printf("%d ", n + 1); else { printf("%d ", i < ind ? arr[i] : arr[i - 1]); } } } return 0; }