#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int main() {
  long long n, k;
  string s;
  cin >> n >> k >> s;
  for (long long i = 0; i < n && k; i++) {
    if (s[i] == '4' && s[i + 1] == '7' && s[i + 2] == '7' && (i % 2 == 0))
      k %= 2;
    if (s[i] == '4' && s[i + 1] == '7' && k) {
      if (i & 1)
        s[i] = s[i + 1];
      else
        s[i + 1] = s[i];
      k--;
      i -= 2;
    }
  }
  cout << s;
  return 0;
}
