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