#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, l, m, n, k;
  scanf("%d %d", &n, &k);
  char str[100005];
  int vis[100005];
  for (i = 0; i < n; i++) vis[i] = false;
  scanf("%s", str);
  bool end = false;
  int cyc = -1;
  vector<string> cycle;
  for (i = 0; i < k && !end;) {
    bool found = false;
    for (j = 0; j < n - 1 && !end; j++) {
      if (str[j] == '4' && str[j + 1] == '7') {
        if (vis[j]) {
          cyc = j;
          end = true;
          break;
        }
        vis[j] = true;
        str[j] = str[j + 1] = (j + 1) % 2 == 1 ? '4' : '7';
        i++;
        if (i == k) {
          printf("%s", str);
          return 0;
        }
        found = true;
        if ((j + 1) % 2 == 0) {
          j = j - 2;
        } else
          j = j - 1;
      }
    }
    if (!found) break;
  }
  if (i < k && cyc != -1) {
    for (j = 0; j < n; j++) vis[j] = false;
    end = false;
    for (j = 0; j < n - 1 && !end; j++) {
      if (str[j] == '4' && str[j + 1] == '7') {
        if (vis[j]) {
          end = true;
          break;
        }
        cycle.push_back(str);
        vis[j] = true;
        str[j] = str[j + 1] = (j + 1) % 2 == 1 ? '4' : '7';
        if ((j + 1) % 2 == 0) {
          j = j - 2;
        } else
          j = j - 1;
      }
    }
    printf("%s", cycle[(k - i) % cycle.size()].c_str());
  } else {
    printf("%s", str);
  }
  return 0;
}
