#include <bits/stdc++.h>
using namespace std;
const double pi = 4.0 * atan(1.0);
const int maxn = 300;
int n, k;
int a[maxn];
int main() {
  int i;
  cin >> n >> k;
  for (i = 1; i <= n * 2 + 1; i++) cin >> a[i];
  for (i = 2; i <= n * 2 + 1; i += 2) {
    if (a[i - 1] < a[i] - 1 && a[i] - 1 > a[i + 1] && k) a[i]--, k--;
  }
  for (i = 1; i <= n * 2 + 1; i++) {
    if (i == 1)
      cout << a[i];
    else
      cout << " " << a[i];
  }
  cout << endl;
  return 0;
}
