#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
int a[MAX];
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  n = 2 * n + 1;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 1; i < n - 1 && k; i++)
    if (a[i - 1] + 1 < a[i] && a[i] > a[i + 1] + 1) {
      a[i]--;
      k--;
    }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << endl;
  return 0;
}
