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