#include #include //小数点出力用 //cout << fixed << setprecision(10) << ans; #include #include #include #include #include #include #include #include using ll = long long; using namespace std; #define modPHash (ll)((1LL<<61)-1) #define modP (ll)998244353 bool chkrng0idx(int pos, int sup) { return (0 <= pos && pos < sup); } int clk4(int num) { return (num - 2) * (num % 2); } void yn(bool tf) { cout << (tf ? "Yes\n" : "No\n"); } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll H, W; cin >> H >> W; while (H--) { string S; cin >> S; for (int i = 0;i < S.size();i++) { if (S[i] == '9') { if (i > 0 && S[i - 1] == 'y') { S[i - 1] = 'Y'; } if (i < S.size() - 1 && S[i + 1] == 'y') { S[i + 1] = 'Y'; } } } cout << S << endl; } return 0; }