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