#include <bits/stdc++.h>
using namespace std;
std::string str;
std::priority_queue<int, vector<int>, greater<int> > position;
int string_size;
int find47();
bool iscircle(int n, int mode);
void solve(int n, int mode);
void find_all47();
int main() {
  int N, K;
  cin >> N >> K >> str;
  string_size = str.size();
  find_all47();
  for (; K > 0; --K) {
    int find = find47();
    if (find == -1) {
      K = 0;
      break;
    }
    if (iscircle(find, find % 2)) {
      K %= 2;
      position.push(find);
      break;
    } else {
      solve(find, find % 2);
    }
  }
  if (K == 1) {
    int find = find47();
    if (find != -1) solve(find, find % 2);
  }
  cout << str << endl;
  return 0;
}
int find47() {
  if (!position.empty()) {
    int no = position.top();
    position.pop();
    return no;
  } else
    return -1;
}
bool iscircle(int n, int mode) {
  if (mode == 1) {
    if (n == 0) return false;
    if (str[n - 1] == '4') return true;
  } else {
    if (n == string_size - 2) return false;
    if (str[n + 2] == '7') return true;
  }
  return false;
}
void solve(int n, int mode) {
  if (mode == 1) {
    str[n] = str[n + 1] = '7';
    if (n != 0 && str[n - 1] == '4') position.push(n - 1);
  } else {
    str[n] = str[n + 1] = '4';
    if (n != string_size - 2 && str[n + 2] == '7') position.push(n + 1);
  }
}
void find_all47() {
  int i;
  for (i = 0; i < string_size - 1; ++i) {
    if (str[i] == '4' && str[i + 1] == '7') position.push(i);
  }
}
