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