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