#include <bits/stdc++.h>
using namespace std;
map<long long, int> p;
char str[100005], ans;
int main() {
  int n, k;
  cin >> n >> k;
  cin >> str;
  int t = 0;
  int flag = 0;
  if (k > k % 100000 + 100000) k = k % 100000 + 100000;
  for (int i = 0; i < k; i++) {
    flag = 0;
    for (int j = t; j < n - 1; j++) {
      if (str[j] == '4' && str[j + 1] == '7') {
        if (j % 2)
          str[j] = '7', t = j - 1;
        else
          str[j + 1] = '4', t = j + 1;
        flag = 1;
        break;
      }
    }
    if (flag != 1) break;
  }
  cout << str << endl;
}
