#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:500000000")
using namespace std;
int A[222];
bool used[222];
int main() {
  int n, k, i;
  cin >> n >> k;
  for (i = 0; i < 2 * n + 1; i++) cin >> A[i];
  int N = 2 * n + 1;
  memset(used, false, sizeof(used));
  while (k) {
    for (i = 1; i < N && k > 0; i++)
      if ((i & 1) && !used[i] && A[i] - 1 > A[i - 1] && A[i] - 1 > A[i + 1])
        used[i] = true, A[i]--, k--;
  }
  printf("%d", A[0]);
  for (i = 1; i < N; i++) printf(" %d", A[i]);
  puts("");
  return 0;
}
