#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; ll INF = 2e18; template using vc = vector; template using vv = vc>; #define MP(a, b) make_pair(a, b) #define nfor(i,s,n) for(ll i=s;i<(ll)n;i++) #define rep(i,n) for(ll i = 0; i < (n); i++) using vl = vc; using vvl = vv; using vvvl = vv; using vvvvl = vv; using vs = vc; using vvs = vv; using vb = vc; using vvb = vv; using vvvb = vv; using vld = vc; using vvld = vv; using vvvld = vv; using P = pair; templateistream& operator>>(istream& i, vc& v) { rep(j, size(v))i >> v[j]; return i; } template using pq = priority_queue>;//大きい順 template using pq_g = priority_queue, greater>;//小さい順 #define pb push_back #define pob pop_back #define all(s) s.begin(),s.end() #define YES std::cout<<"Yes"<; using vvm = vc; int main(){ ll h, w; cin >> h >> w; vs s(h); rep(i, h){ cin >> s[i]; } rep(i, h){ rep(j, w){ if(s[i][j] == 'y'){ s[i][j + 4] = 'Y'; j += 5; continue; } if(s[i][j] == '9'){ s[i][j + 1] = 'Y'; j += 5; continue; } } } rep(i, h){ cout << s[i] << endl; } }