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