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