#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
int N, K;
int A[MAX];
int main() {
  cin >> N >> K;
  N = 2 * N + 1;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (int i = 0; i < N; i++) {
    if (i % 2 == 1 and K > 0) {
      if (A[i] > A[i - 1] + 1 and A[i] > A[i + 1] + 1) {
        K--;
        A[i]--;
      }
    }
    cout << A[i] << " ";
  }
  cout << endl;
}
