#include <bits/stdc++.h>
using namespace std;
int n, k, st = 1;
char s[100010];
int main() {
  scanf("%d %d ", &n, &k);
  scanf("%s", s + 1);
  if (k % 2 == 1)
    k = min(k, n * 4 + 1);
  else
    k = min(k, n * 4);
  while (k--) {
    while (st < n) {
      if (s[st] == '4' && s[st + 1] == '7') {
        if (st % 2 == 1)
          s[st + 1] = '4';
        else
          s[st] = '7';
        st--;
        break;
      }
      st++;
    }
  }
  printf("%s\n", s + 1);
}
