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