#if __has_include() #include using namespace atcoder; #else #include #if __has_include() #include using namespace atcoder; #endif #endif using namespace std; #define int long long #define all(x) (x).begin(), (x).end() #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for(int i = (int)((n) - 1); i >= 0; i--) template bool chmax(T &a,const T &b){if(a bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;} // using mint = modint; signed main(){ int h, w; cin >> h >> w; vector s(h); for(auto&& si : s) cin >> si; for(auto&& si : s) rep(j, w){ if(si.substr(j, 6) == "yiwiy9") si.at(j + 4) = 'Y',j+=5; else if(si.substr(j, 6) == "9yiwiy") si.at(j + 1) = 'Y',j+=5; } for(auto& si : s) cout << si << '\n'; }