using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; using System.Linq; class Magatro { static int H, W; static void Main() { string[] s = Console.ReadLine().Split(' '); H = int.Parse(s[0]); W = int.Parse(s[1]); char[][] Sky = new char[H][]; P[] a = new P[2]; int c = 0; for (int i = 0; i < H; i++) { Sky[i] = Console.ReadLine().ToArray(); } for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { if (Sky[i][j] == '*') { a[c] = new P(i, j); c++; } } } for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { int T = a[0].Y * (a[1].X - j) + a[1].Y * (j - a[0].X) + i * (a[0].X - a[1].X); if (T != 0) { Sky[i][j] = '*'; for (int k = 0; k < H; k++) { Console.WriteLine(new String(Sky[k])); } return; } } } } } struct P { public P(int y,int x) { Y = y; X = x; } public int X, Y; }