#include #include #include #include #include #include using namespace atcoder; using namespace std; using ll = long long; using ull = unsigned long long; template using max_heap = priority_queue; template using min_heap = priority_queue, greater<>>; ll ll_min = numeric_limits::min(); ll ll_max = numeric_limits::max(); ll ALPHABET_N = 26; using mint = modint998244353; #define rep(i, n) for (ll i = (ll)0; i < (ll)n; i++) #define rep_(i, k, n) for (ll i = (ll)k; i < (ll)n; i++) #define all(a) a.begin(), a.end() int main() { ios::sync_with_stdio(false); cin.tie(0); ll h, w; cin >> h >> w; vector> S(h); rep(i, h) { string s; cin >> s; ll j = 0; while (j < s.size()) { if (s[j] == '.') { // S[i][j] = "."; S[i].push_back("."); j++; } else { string t; rep(_, 6) { t += s[j]; j++; } // S[i][j] = t; S[i].push_back(t); } } } auto f = [](string &s) -> string { if (s == ".") return "."; if (s[0] == '9') { return "9Yiwiy"; } else { return "yiwiY9"; } }; rep(i, h) { rep(j, S[i].size()) { cout << f(S[i][j]); } cout << endl; } return 0; }