
#include<bits/stdc++.h>
using namespace std;

#define ff              first
#define fo(i,n)         for(i=0;i<n;i++)
#define Fo(i,k,n)       for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define deb(x)          cout << #x << "=" << x << endl
#define deb2(x, y)      cout << #x << "=" << x << "," << #y << "=" << y << endl
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define w(x)            int x; cin>>x; while(x--)
#define FIO             ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());


const int N = 3e5, M = N;
//=======================


void solve() {
  int i, j, n, m;
  cin>>n;
  char board[n][n];
  pair<int,int> p1,p2,p3,p4;
  p1.first = -1;
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      cin>>board[i][j];
      if(board[i][j]=='*' && p1.first==-1){
        p1.first = i;
        p1.second = j;
      }
      if(board[i][j]=='*' && p1.first!=-1){
        p2.first=i;
        p2.second=j;
      }
    }
  }
  //same row
  if(p1.first==p2.first){
    p3.second=p1.second;
    p4.second=p2.second;
    if(p1.first==n-1){
      p3.first=n-2;
      p4.first=n-2;
    }
    else{
      p3.first = p1.first+1;
      p4.first = p1.first+1;

    }
  }
  //same column
  else if(p1.second==p2.second){
    p3.first=p1.first;
    p4.first=p2.first;
    if(p1.second==n-1){
      p3.second=n-2;
      p4.second=n-2;
    }
    else{
      p3.second = p1.second+1;
      p4.second = p1.second+1;

    }
  }

  // diff
  else if(p1.first<p2.first && p1.second<p2.second){
    p3.first = p1.first;
    p3.second = p2.second;

    p4.first = p2.first;
    p4.second = p1.second;
  }
  else{
    p4.first = p1.first;
    p4.second = p2.second;

    p3.first = p2.first;
    p3.second = p1.second;
  }
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      pair<int,int> p;
      p={i,j};
      if(p==p1 || p==p2 || p==p3 || p==p4){
        cout<<'*';

      }
      else{
        cout<<'.';
      }
    }
    cout<<'\n';
  }

}

int32_t main()
{
  FIO;
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  w(t)
  solve();
  return 0;
}

### Prompt

Generate a Cpp solution to the following problem:

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


*.*.
....
*.*.
....
**
**
**
**
*.*
*.*
...
.....
.**..
.....
.**..
.....
....
....
**..
**..

### Response

```cpp

#include<bits/stdc++.h>
using namespace std;

#define ff              first
#define fo(i,n)         for(i=0;i<n;i++)
#define Fo(i,k,n)       for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define deb(x)          cout << #x << "=" << x << endl
#define deb2(x, y)      cout << #x << "=" << x << "," << #y << "=" << y << endl
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define w(x)            int x; cin>>x; while(x--)
#define FIO             ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());


const int N = 3e5, M = N;
//=======================


void solve() {
  int i, j, n, m;
  cin>>n;
  char board[n][n];
  pair<int,int> p1,p2,p3,p4;
  p1.first = -1;
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      cin>>board[i][j];
      if(board[i][j]=='*' && p1.first==-1){
        p1.first = i;
        p1.second = j;
      }
      if(board[i][j]=='*' && p1.first!=-1){
        p2.first=i;
        p2.second=j;
      }
    }
  }
  //same row
  if(p1.first==p2.first){
    p3.second=p1.second;
    p4.second=p2.second;
    if(p1.first==n-1){
      p3.first=n-2;
      p4.first=n-2;
    }
    else{
      p3.first = p1.first+1;
      p4.first = p1.first+1;

    }
  }
  //same column
  else if(p1.second==p2.second){
    p3.first=p1.first;
    p4.first=p2.first;
    if(p1.second==n-1){
      p3.second=n-2;
      p4.second=n-2;
    }
    else{
      p3.second = p1.second+1;
      p4.second = p1.second+1;

    }
  }

  // diff
  else if(p1.first<p2.first && p1.second<p2.second){
    p3.first = p1.first;
    p3.second = p2.second;

    p4.first = p2.first;
    p4.second = p1.second;
  }
  else{
    p4.first = p1.first;
    p4.second = p2.second;

    p3.first = p2.first;
    p3.second = p1.second;
  }
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      pair<int,int> p;
      p={i,j};
      if(p==p1 || p==p2 || p==p3 || p==p4){
        cout<<'*';

      }
      else{
        cout<<'.';
      }
    }
    cout<<'\n';
  }

}

int32_t main()
{
  FIO;
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  w(t)
  solve();
  return 0;
}

```