There is a square field of size n × n in which two cells are marked. These cells can be in the same row or column.

You are to mark two more cells so that they are the corners of a rectangle with sides parallel to the coordinate axes.

For example, if n=4 and a rectangular field looks like this (there are asterisks in the marked cells):

$$$ \begin{matrix} . & . & * & . \\\ . & . & . & . \\\ * & . & . & . \\\ . & . & . & . \\\ \end{matrix} $$$

Then you can mark two more cells as follows

$$$ \begin{matrix} * & . & * & . \\\ . & . & . & . \\\ * & . & * & . \\\ . & . & . & . \\\ \end{matrix} $$$

If there are several possible solutions, then print any of them.

Input

The first line contains a single integer t (1 ≤ t ≤ 400). Then t test cases follow.

The first row of each test case contains a single integer n (2 ≤ n ≤ 400) — the number of rows and columns in the table.

The following n lines each contain n characters '.' or '*' denoting empty and marked cells, respectively.

It is guaranteed that the sums of n for all test cases do not exceed 400.

It is guaranteed that there are exactly two asterisks on the field. They can be in the same row/column.

It is guaranteed that the solution exists.

Output

For each test case, output n rows of n characters — a field with four asterisks marked corresponding to the statements. If there multiple correct answers, print any of them.

Example

Input


6
4
..*.
....
*...
....
2
*.
.*
2
.*
.*
3
*.*
...
...
5
.....
..*..
.....
.*...
.....
4
....
....
*...
*...


Output


*.*.
....
*.*.
....
**
**
**
**
*.*
*.*
...
.....
.**..
.....
.**..
.....
....
....
**..
**..
//package  com.company;
import java.io.*;
import java.util.*;
import java.lang.*;

public class Main
{
    public static void main(String[] args){
        FastReader sc = new FastReader();
        int t = sc.nextInt();
        while(t--!=0)
        {
            int n = sc.nextInt();
            int [][] ar = new int[n][n];
            boolean temp = false;
            int x1 = 0;
            int x2 = 0;
            int y1 = 0;
            int y2 = 0;
            for(int i = 0;i<n;i++)
            {
                String s = sc.nextLine();
                char [] arr = s.toCharArray();
                for(int j = 0;j<n;j++)
                {
                    ar[i][j] = arr[j];
                    if(ar[i][j] == '*' && temp == false)
                    {
                        x1 = i;
                        x2 = j;
                        temp = true;
                    }
                    else if(ar[i][j] == '*' && temp == true)
                    {
                        y1 = i;
                        y2 = j;
                    }
                }
            }
            if(x1 == y1)
            {
                if(n - 1>x1)
                    x1++;
                else
                    x1--;
            }
            if(x2 == y2)
            {
                if(n - 1>x2)
                    x2++;
                else
                    x2--;
            }
            for(int i = 0;i<n;i++)
            {
                for(int j = 0;j<n;j++)
                {
                    if((i == x1 || i == y1) && (j == x2 || j == y2))
                        System.out.print("*");
                    else
                        System.out.print(".");
                }
                System.out.println();
            }
        }
    }
    public static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static long gcd(long a, long b) {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }
//
//    static long lcm(long a, long b) {
//        return (a / gcd(a, b)) * b;
//    }
//
//    static void prime_upto_10pow8()
//    {
//        boolean[] prime = new boolean[100000000];
//        Arrays.fill(prime, true);
//        int i;
//        prime[1] = false;
//        prime[0] = false;
//        for (i = 4; i < 100000000; i += 2)
//            prime[i] = false;
//
//        prime[2] = true;
//        for (i = 3; i * i < 100000000; i += 2) {
//            if (prime[i])
//                for (int j = i * i; j > 0 && j < 100000000; j = j + (2 * i))
//                    prime[j] = false;
//        }
//        int[] arr = new int[8000000];
//        int j = 0;
//        arr[0] = 2;
//        int n = 100000000;
//        for (i = 3; i <= n; i += 2) {
//            if (prime[i])
//                arr[++j] = i;
//        }
//        for (i = 1; i <= j; i += 100) {
//            System.out.println(arr[i - 1]);
//        }
//    }
//
//    static int fact(int n) {
//        int res = 1;
//        for (int i = 2; i <= n; i++)
//            res = res * i;
//        return res;
//    }
    // int gcd of a nd b is gcdExtended(a, b, x, y);
}
//class Pair
//{
//    int x;
//    int y;
//    Pair(int x,int y)
//    {
//        this.x = x;
//        this.y = y;
//    }
//}









