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