#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int n, i, k;
  string S;
  cin >> n >> k;
  cin >> S;
  for (i = 1; i < n && k; i++)
    if (S[i] == '7' && S[i - 1] == '4') {
      if (i & 1)
        S[i] = '4', k--;
      else if (S[i - 2] != '4')
        S[i - 1] = '7', k--;
      else {
        if (k & 1) S[i - 1] = '7';
        k = 0;
      }
    }
  cout << S;
  return EXIT_SUCCESS;
}
