#include <bits/stdc++.h>
using namespace std;
int n, k;
char ch[100005];
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", ch + 1);
  int nn = 0, pp = 0, pp2 = 1;
  while (nn <= k) {
    if (nn == k) {
      pp = 1;
      printf("%s\n", ch + 1);
      break;
    }
    nn++;
    bool ff = 0;
    int pos = -1, pos2 = -1;
    for (int i = pp2; i < n; i++) {
      if (ch[i] == '4' && ch[i + 1] == '7' && ch[i + 2] == '7' && i + 2 <= n &&
          i % 2) {
        pos = i;
        break;
      }
      if (ch[i] == '4' && ch[i + 1] == '4' && ch[i + 2] == '7' && i + 2 <= n &&
          i % 2) {
        pos2 = i;
        break;
      }
      if (ch[i] == '4' && ch[i + 1] == '7') {
        pp2 = i;
        if (i % 2)
          ch[i] = '4', ch[i + 1] = '4';
        else
          ch[i] = '7', ch[i + 1] = '7';
        ff = 1;
        break;
      }
    }
    pp2--;
    pp2 = max(pp2, 1);
    if (pos != -1 || pos2 != -1) break;
    if (!ff) {
      pp = 1;
      printf("%s\n", ch + 1);
      break;
    }
  }
  if (!pp) {
    k -= nn;
    k++;
    k %= 2;
    nn = 0;
    while (nn <= k) {
      if (nn == k) {
        printf("%s\n", ch + 1);
        break;
      }
      nn++;
      bool ff = 0;
      for (int i = 1; i < n; i++) {
        if (ch[i] == '4' && ch[i + 1] == '7') {
          if (i % 2)
            ch[i] = '4', ch[i + 1] = '4';
          else
            ch[i] = '7', ch[i + 1] = '7';
          ff = 1;
          break;
        }
      }
      if (!ff) {
        printf("%s\n", ch + 1);
        break;
      }
    }
  }
  return 0;
}
