using System; using System.Collections.Generic; using P = System.Numerics.Complex; class Program { static void Main() { string[] str = Console.ReadLine().Split(' '); int h = int.Parse(str[0]); int w = int.Parse(str[1]); var s = new List(3); var star = new List

(3); for (int i = 0; i < h; i++) { s.Add(Console.ReadLine().ToCharArray()); for (int j = 0; j < w; j++) if (s[i][j] == '*') star.Add(new P(i, j)); } var rand = new Random(); int sh, sw; while (true) { sh = rand.Next(h); sw = rand.Next(w); if (star.Count < 3) star.Add(new P(sh, sw)); else star[2] = new P(sh, sw); P vec1 = star[1] - star[0]; P vec2 = star[2] - star[0]; if (vec1.Real * vec2.Imaginary - vec1.Imaginary * vec2.Real != 0) { s[sh][sw] = '*'; for (int i = 0; i < h; i++) Console.WriteLine(s[i]); return; } } } }