#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); int h, w; cin >> h >> w; vector s(h); rep(i, h) cin >> s[i]; rep(i, h) { while (true) { auto pos = s[i].find("yiwiy9"); if (pos == string::npos) break; s[i].replace(pos, 6, "yiwiY9"); } while (true) { auto pos = s[i].find("9yiwiy"); if (pos == string::npos) break; s[i].replace(pos, 6, "9Yiwiy"); } cout << s[i] << '\n'; } return 0; }