let findPos (S : (char array) array) H W = [for i in 0 .. H - 1 do for j in 0 .. W - 1 -> (i, j)] |> List.filter (fun (y, x) -> S.[y].[x] = '*') let cross y1 x1 y2 x2 = y1 * x2 - y2 * x1 let isParallel y1 x1 y2 x2 y3 x3 = cross (y2 - y1) (x2 - x1) (y3 - y1) (x3 - x1) = 0 let H, W = System.Console.ReadLine().Split() |> Array.map int |> fun a -> a.[0], a.[1] let S = [|for i in 1 .. H -> System.Console.ReadLine().ToCharArray()|] let (y1, x1), (y2, x2) = findPos S H W |> Array.ofList |> fun a -> a.[0], a.[1] let y3, x3 = [for i in 0 .. H - 1 do for j in 0 .. W - 1 -> (i, j)] |> List.filter (fun (y, x) -> not (isParallel y x y1 x1 y2 x2)) |> List.head S.[y3].[x3] <- '*' S |> Array.iter (fun s -> s |> System.String.Concat |> System.Console.WriteLine)