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