#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, k, cnt = 0;
  cin >> n >> k;
  string s, ans;
  cin >> s;
  ans = s;
  for (int i = 0; i < n - 1 and k > 0; i++) {
    if (i & 1 and s[i - 1] == '4' and s[i] == '4' and s[i + 1] == '7') {
      if (k & 1) {
        s[i] = '7';
        k = 0;
      } else {
        s[i] = '4';
        k = 0;
      }
    } else if (s[i] == '4' and s[i + 1] == '7') {
      if (i & 1) {
        s[i] = '7';
        s[i + 1] = '7';
      } else {
        s[i] = '4';
        s[i + 1] = '4';
      }
      k--;
    }
  }
  cout << s << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
