#include <bits/stdc++.h>
using namespace std;
template <class T>
T operator&(const complex<T>& a, const complex<T>& b) {
  return real(a) * real(b) + imag(a) * imag(b);
}
template <class T>
T operator|(const complex<T>& a, const complex<T>& b) {
  return real(a) * imag(b) - imag(a) * real(b);
}
template <class T>
bool operator||(const complex<T>& a, const complex<T>& b) {
  return a | b == 0;
}
template <class T>
bool operator&&(const complex<T>& a, const complex<T>& b) {
  return a & b == 0;
}
const long double EPS = 1e-6;
const long long INF = 1000000000000000000LL;
const int SINF = 1000000000;
inline int ri() {
  int x;
  scanf("%d", &x);
  return x;
}
inline long long rl() {
  long long x;
  scanf("%I64d", &x);
  return x;
}
char tab[100007];
int b[100007];
int main(int argc, char** argv, char** envp) {
  int n, t;
  n = ri();
  t = ri();
  scanf("%s", tab + 1);
  int k = 1;
  bool cycle = false;
  int i = 0;
  while (t > 0) {
    i++;
    while (k < n && (tab[k] != '4' || tab[k + 1] != '7')) k++;
    if (k == n) break;
    if (b[k] && !cycle) {
      t %= (i - b[k]);
      if (!t) break;
      cycle = true;
    }
    b[k] = i;
    if (k % 2 == 1) {
      tab[k] = tab[k + 1] = '4';
    } else {
      tab[k] = tab[k + 1] = '7';
      k -= 1;
    }
    t--;
  }
  printf("%s\n", tab + 1);
  return 0;
}
