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++; } } } loop: for(int i = 0; i < H; i++) { for(int j = 0; j < W; j++) { boolean flag = true; for(int k = 0; k < 2; k++) { if(r[k] == i && c[j] == i) { flag = false; continue; } } if(flag) { 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(); } } }