#include <bits/stdc++.h>   using namespace std;   int minimum(int x, int y) { return (x < y ? x : y); }   template <typename type>   struct even {     bool operator()(const type &x, const type &y) const { return x % 2 == 0; }   };   template <typename type>   struct odd {     bool operator()(const type &x, const type &y) const { return x % 2 != 0; }   };   bool flusher(int x) {     string s;     cout << x << endl;     fflush(stdout);     cin >> s;     return s ==  yes ;   }   long long int magic(string s) {     long long int sum = 0;     for (int i = 0; i < s.size(); i++) {       sum += s[i] -  0 ;     }     return sum;   }   long long int binaryToInt(string s) {     long long int n = s.length();     long long int res = 0;     long long int base = 1;     for (long long int i = n - 1; i >= 0; i--) {       if (s[i] ==  1 ) {         res += base;       }       base *= 2;     }     return res;   }   int main() {     ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);     int n, k;     cin >> n >> k;     int length = n * 2 + 1;     int res = 0;     int x[length];     for (int i = 0; i < length; i++) {       cin >> x[i];     }     for (int i = 1; i < length; i += 2) {       if (x[i] - 1 > x[i - 1] && x[i] - 1 > x[i + 1]) {         x[i]--;         res++;       }       if (res == k) {         break;       }     }     for (int i = 0; i < length; i++) {       cout << x[i] <<    ;     }     return 0;   }   