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