#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) { rep(j, w) { if (s[i].substr(j, 6) == "yiwiy9") { s[i].replace(j, 6, "yiwiY9"); j += 5; } else if (s[i].substr(j, 6) == "9yiwiy") { s[i].replace(j, 6, "9Yiwiy"); j += 5; } } cout << s[i] << '\n'; } return 0; }