#include <bits/stdc++.h>
using namespace std;
int heights[250];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i <= 2 * n; ++i) {
    scanf("%d", &heights[i]);
  }
  int amount = 0;
  for (int i = 1; i < 2 * n && amount < k; i += 2) {
    if (heights[i] - 1 > heights[i - 1] && heights[i] - 1 > heights[i + 1]) {
      ++amount;
      --heights[i];
    }
  }
  for (int i = 0; i <= 2 * n; ++i) {
    printf("%d ", heights[i]);
  }
  return 0;
}
