#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:214721677")
using namespace std;
const double Pi = acos(-1.0);
const double eps = 1e-10;
const int INF = 1000 * 1000 * 1000 + 7;
const double phi = 0.5 + sqrt(1.25);
template <class T>
T sqr(T a) {
  return (a) * (a);
}
template <class T>
T abs(T a) {
  return (a < 0) ? -(a) : (a);
}
int main() {
  int n, N, k;
  scanf("%d%d\n", &N, &k);
  n = 2 * N + 1;
  vector<int> v(n + 2);
  for (int i = 0, _n = (n)-1; i <= _n; ++i) scanf("%d\n", &v[i + 1]);
  int done = 0;
  for (int i = 1; i <= N && done < k; ++i) {
    int id = 2 * i;
    if (v[id] - v[id - 1] > 1 && v[id] - v[id + 1] > 1) --v[id], ++done;
  }
  for (int i = (1), _b = (n); i <= _b; ++i) {
    if ((i - 1)) printf(" ");
    printf("%d", v[i]);
  }
  printf("\n");
  return 0;
}
