#include <bits/stdc++.h>
using namespace std;
int a[205];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= 2 * n + 1; i++) cin >> a[i];
  int count = 0;
  for (int i = 1; i <= n; i++) {
    if ((a[2 * i] - 1) > a[2 * i - 1] && (a[2 * i] - 1) > a[2 * i + 1]) {
      a[2 * i]--;
      count++;
    }
    if (count == k) break;
  }
  for (int i = 1; i <= 2 * n + 1; i++) cout << a[i] << " ";
  return 0;
}
