#include <bits/stdc++.h>
using namespace std;
int n, k;
int r[210] = {};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(20);
  cin >> n >> k;
  for (int i = 0; i < 2 * n + 1; ++i) cin >> r[i];
  for (int i = 0; i < 2 * n + 1; ++i) {
    if (k > 0 && i % 2 == 1 && r[i] - r[i - 1] > 1 && r[i] - r[i + 1] > 1) {
      k -= 1;
      cout << r[i] - 1 << ' ';
    } else {
      cout << r[i] << ' ';
    }
  }
  cout << endl;
}
