#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, m, n, rez = 0;
  int a[300];
  bool b[300] = {0};
  bool c;
  cin >> n >> k;
  for (i = 1; i <= 2 * n + 1; i++) cin >> a[i];
  for (j = 0; j < k; j++) {
    c = true;
    i = 2;
    while (c) {
      if (!b[i] && a[i] > a[i - 1] + 1 && a[i] > a[i + 1] + 1) {
        a[i]--;
        b[i] = true;
        c = false;
      }
      i += 2;
    }
  }
  for (i = 1; i <= 2 * n + 1; i++) cout << a[i] << " ";
  return 0;
}
