#include <bits/stdc++.h>
using namespace std;
const int maxn = 205;
int a[maxn];
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  scanf("%d %d", &n, &k);
  int m = n + n + 1;
  for (int i = 0; i < m; ++i) scanf("%d", &a[i]);
  for (int i = 1; k && i < m; i += 2) {
    if (a[i] > max(a[i - 1], a[i + 1]) + 1) {
      --a[i];
      --k;
    }
  }
  for (int i = 0; i < m; ++i) printf("%d ", a[i]);
  putchar('\n');
  return 0;
}
