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