#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n, k, a[202], s = 0, d = -1;
int main() {
  ios_base ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> k;
  n = 2 * n + 1;
  for (ll(i) = ll(0); (i) < (ll)(n); ++(i)) cin >> a[i];
  for (int i = 1; i < n; i += 2) {
    if (a[i] - 1 > a[i - 1] && a[i] - 1 > a[i + 1]) {
      a[i]--;
      k--;
    }
    if (k == 0) break;
  }
  for (ll(i) = ll(0); (i) < (ll)(n); ++(i)) cout << a[i] << " ";
}
