#include using namespace std; int main() { int H, W; cin >> H >> W; for (int y = 0; y < H; y++) { string S; cin >> S; for (int x = 0; x + 6 <= W; x++) { if (S.substr(x, 6) == "yiwiy9") { S[x + 4] = 'Y'; } else if (S.substr(x, 6) == "9yiwiy") { S[x + 1] = 'Y'; } } cout << S << endl; } return 0; }