#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, k;
  cin >> n >> k;
  n = n * 2 + 1;
  vector<int> v(n);
  for (int &ele : v) cin >> ele;
  for (int i = 1; i <= n && k > 0; i += 2) {
    if ((v[i] - v[i - 1]) > 1 && (v[i] - v[i + 1]) > 1) {
      k--;
      v[i]--;
    }
  }
  for (int i = 0; i < n; i++) cout << v[i] << " ";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
}
