#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); int h, w; cin >> h >> w; string str; for(int y = 0; y < h; y++){ cin >> str; for(int x = 0; x + 6 <= w; x++){ if(str.substr(x, 6) == "yiwiy9"){ str[x + 4] = 'Y'; x += 5; continue; } if(str.substr(x, 6) == "9yiwiy"){ str[x + 1] = 'Y'; x += 5; continue; } } cout << str << '\n'; } }