#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, k, c = 0;
  cin >> n >> k;
  long long int a[2 * n + 2];
  for (long long int i = 1; i <= 2 * n + 1; ++i) {
    cin >> a[i];
  }
  for (long long int i = 1; i <= 2 * n + 1; ++i) {
    if (i % 2 == 0 && c < k && a[i] - 1 > a[i - 1] && a[i] - 1 > a[i + 1])
      cout << a[i] - 1 << " ", c++;
    else
      cout << a[i] << " ";
  }
  return 0;
}
