H, W = map(int, input().split()) G = [input() for _ in range(H)] ANS = [] for s in G: t = [] i = 0 while i < W: if s[i] == ".": t.append(".") i += 1 elif s[i] == "y": t.append("yiwiY9") i += 6 elif s[i] == "9": t.append("9Yiwiy") i += 6 ANS.append("".join(t)) print(*ANS, sep="\n")