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