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