#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K;
  int r[500];
  int cnt[500];
  cin >> N >> K;
  for (int _n(2 * N + 1), i(0); i < _n; i++) cin >> r[i];
  for (int i = 0; i < 2 * N + 1; i++) {
    if (i) cout << " ";
    if (i % 2 == 0)
      cout << r[i];
    else if (K && r[i] > r[i - 1] + 1 && r[i] > r[i + 1] + 1) {
      K--;
      cout << r[i] - 1;
    } else
      cout << r[i];
  }
  cout << endl;
  return 0;
}
