#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
bool check_key(map<int64_t, int64_t> m, int64_t key) {
  if (m.find(key) == m.end()) return false;
  return true;
}
vector<int64_t> SieveOfEratosthenes(int64_t n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  vector<int64_t> res;
  for (int64_t p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int64_t i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (int64_t p = 2; p <= n; p++)
    if (prime[p]) res.push_back(p);
  return res;
}
bool checkPalindrome(string s) {
  if (s.length() == 1 || s.length() == 0) {
    return true;
  }
  string firstHalf = "", secondHalf = "";
  if (s.length() % 2 == 1) {
    for (int64_t i = 0; i < s.length() / 2; i++) {
      firstHalf += tolower(s[i]);
    }
    for (int64_t i = s.length() / 2 + 1; i < s.length(); i++) {
      secondHalf += tolower(s[i]);
    }
  } else {
    for (int64_t i = 0; i < s.length() / 2; i++) {
      firstHalf += tolower(s[i]);
    }
    for (int64_t i = s.length() / 2; i < s.length(); i++) {
      secondHalf += tolower(s[i]);
    }
  }
  reverse(secondHalf.begin(), secondHalf.end());
  if (firstHalf == secondHalf)
    return true;
  else
    return false;
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  int64_t n, r;
  cin >> n >> r;
  vector<int64_t> v;
  for (int64_t i = 0; i < 2 * n + 1; i++) {
    int64_t n1;
    cin >> n1;
    v.push_back(n1);
  }
  int64_t cnt = 0;
  for (int64_t i = 1; i < 2 * n + 1; i++) {
    if (v[i] - 1 > v[i + 1] && v[i] - 1 > v[i - 1]) {
      cnt += 1;
      v[i] -= 1;
      if (cnt == r) break;
    }
  }
  for (auto elem : v) {
    cout << elem << " ";
  }
  return 0;
}
