#include <bits/stdc++.h>
using namespace std;
const int N = 1000000;
int x[N];
int main() {
  ios::sync_with_stdio(false);
  int a, b;
  cin >> a >> b;
  for (int i = 1; i <= 2 * a + 1; i++) {
    cin >> x[i];
  }
  for (int i = 1; i <= 2 * a + 1; i++) {
    if (b && !(i & 1) && x[i] - x[i - 1] > 1 && x[i] - x[i + 1] > 1) {
      x[i]--;
      b--;
    }
    cout << x[i] << " ";
  }
}
