#include using namespace std; using ll = long long; #define ALL(a) (a).begin(), (a).end() #define Yes cout << "Yes" << endl #define No cout << "No" << endl #define endl '\n' int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int H, W; cin >> H >> W; for (; H--;) { string S; cin >> S; for (int i = 0; i < ssize(S) - 2; i++) { if (S[i] == 'i' && S[i + 1] == 'y' && S[i + 2] == '9') { S[i + 1] = 'Y'; } if (S[i] == '9' && S[i + 1] == 'y' && S[i + 2] == 'i') { S[i + 1] = 'Y'; } } cout << S << endl; } }