#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, x;
  cin >> n >> k;
  x = 2 * n + 1;
  int a[x];
  for (int i = 0; i < x; i++) {
    cin >> a[i];
  }
  for (int i = 1; i < x; i += 2) {
    if (k > 0) {
      if ((a[i] > (a[i - 1] + 1)) && (a[i] > (a[i + 1] + 1))) {
        a[i]--;
        k--;
      }
    }
  }
  for (int i = 0; i < x; i++) {
    cout << a[i] << " ";
  }
  return 0;
}
