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