import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int H = scan.nextInt(); int W = scan.nextInt(); int[]r = new int[3]; int[]c = new int[3]; int idx = 0; char [][]s = new char[H][W]; for(int i = 0; i < H; i++) { for(int j = 0; j < W; j++) { s[i][j] = '-'; } } for(int i = 0; i < H; i++) { String t = scan.next(); for(int j = 0; j < W; j++) { char ch = t.charAt(j); if(ch == '*') { r[idx] = i; c[idx] = j; s[i][j] = '*'; idx++; } } } int[]p = {r[0] - r[1], c[0] - c[1]}; loop: for(int i = 0; i < H; i++) { for(int j = 0; j < W; j++) { int vy = r[0] - i; int vx = c[0] - j; if(p[0] * vx == p[1] * vy) { continue; }else { r[2] = i; c[2] = j; break loop; } } } s[r[2]][c[2]] = '*'; for(int i = 0; i < H; i++) { for(int j = 0; j < W; j++) { System.out.print(s[i][j]); } System.out.println(); } } }