#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  n = 2 * n + 1;
  vector<int> answer;
  for (int i = 1; i <= n; i++) {
    int y;
    cin >> y;
    answer.push_back(y);
  }
  int i = 0;
  while (k) {
    if (i % 2 == 1) {
      if (i != answer.size() - 1) {
        if (answer[i] - 1 > answer[i - 1] && answer[i] - 1 > answer[i + 1]) {
          answer[i]--;
          k--;
        }
      } else {
        if (answer[i] - 1 > answer[i - 1]) {
          answer[i]--;
          k--;
        }
      }
    }
    i++;
  }
  for (int i = 0; i < answer.size(); i++) {
    cout << answer[i] << " ";
  }
  cout << endl;
}
