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