#include<bits/stdc++.h>
using namespace std;
#define ff              first
#define ss              second
#define fo(i,n)         for(int i=0;i<n;i++)
#define fod(i,n)        for(int i=n-1;i>=0;i--)
#define For(i,a,b)      for(int i=a;i<=b;i++)
#define all(x)          x.begin(),x.end()
#define SET(x,v)        memset(x,v,sizeof(x))
#define si              set<int>
#define pb(i)           emplace_back(i)
#define sll             set<long long>
#define vs              vector<string>
#define yes             cout<<"YES\n"
#define no              cout<<"NO\n"
#define vpii            vector<pair<int,int>>
#define ll              long long int
#define vi              vector<ll>
#define mod             1000000007
#define tc(t)           int t; cin>>t; while(t--)
#define sfm(a,m,n)      ll a[m][n]; fo(i,m) fo(j,n) cin>>a[i][j]
#define sfarr(a,n)      ll a[n]; fo(i,n) cin>>a[i]
#define sfv(v,n)        vi v(n); for(ll &i:v) cin>>i
int f[1000001];
int prime[1000001];
void sieve(){
    prime[0]=prime[1]=0;
    For(i,2,1000000) prime[i]=1;
    for(int i=2;i*i<=1000000;i++){
        if(prime[i]){
            for(ll j=i*i;j<=1000000;j+=i)
            prime[j]=0;
        }
    }
}
int power(int a,int b){
    int r=1;
    while(b){
        if(b&1){
            r=(r*1ll*a)%mod;
            b--;
        }
        else{
            a=(a*1ll*a)%mod;
            b>>=1;
        }
    }
    return r;
}
void factorial(){
    f[0]=f[1]=1;
    For(i,2,1000000) f[i]=(f[i-1]*1ll*i)%mod;
}
int nCr(int a,int b){
     factorial();
     int r=f[a]; 
     r=(r*1ll*power(f[b],mod-2))%mod;
     r=(r*1ll*power(f[a-b],mod-2))%mod;
     return r;
}
vi z_algo(string s){
    ll n=s.length(),l=0,r=0;
    vi z(n);
    For(i,1,n-1){
        if(i<=r) z[i]=min(r-i+1,z[i-l]);
        while(z[i]+i<n && s[z[i]]==s[i+z[i]]) z[i]++;
        if(i+z[i]-1>r) l=i,r=i+z[i]-1;
    }
    return z;
}
signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    tc(T){
        int n; cin>>n;
        char c[n][n];
        char t='*';
        vpii v;
        For(i,0,n-1){
            For(j,0,n-1){
                cin>>c[i][j];
                if(c[i][j]==t)
                v.pb(make_pair(i,j));
            }
        }
        if(v[0].ff==v[1].ff || v[0].ss==v[1].ss){
            if(v[0].ff==v[1].ff){
                if(v[0].ff+1<n){
                    c[v[0].ff+1][v[0].ss]=t;
                    c[v[1].ff+1][v[1].ss]=t;
                }
                else{
                     c[v[0].ff-1][v[0].ss]=t;
                     c[v[1].ff-1][v[1].ss]=t;
                }
            }
            else{
                if(v[1].ss+1<n){
                    c[v[0].ff][v[0].ss+1]=t;
                    c[v[1].ff][v[1].ss+1]=t;
                }
                else{
                    c[v[0].ff][v[0].ss-1]=t;
                    c[v[1].ff][v[1].ss-1]=t;
                }
            }
        }
            else{
                c[v[0].ff][v[1].ss]=t;
                c[v[1].ff][v[0].ss]=t;
            }
        
        // cout<<c[v[0].ff][v[1].ss]<<" "<<c[v[1].ff][v[0].ss];
        For(i,0,n-1){
            For(j,0,n-1){
                cout<<c[i][j];
            }
            cout<<"\n";
        }
    }
return 0;
}


### Prompt

Please formulate 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 ss              second
#define fo(i,n)         for(int i=0;i<n;i++)
#define fod(i,n)        for(int i=n-1;i>=0;i--)
#define For(i,a,b)      for(int i=a;i<=b;i++)
#define all(x)          x.begin(),x.end()
#define SET(x,v)        memset(x,v,sizeof(x))
#define si              set<int>
#define pb(i)           emplace_back(i)
#define sll             set<long long>
#define vs              vector<string>
#define yes             cout<<"YES\n"
#define no              cout<<"NO\n"
#define vpii            vector<pair<int,int>>
#define ll              long long int
#define vi              vector<ll>
#define mod             1000000007
#define tc(t)           int t; cin>>t; while(t--)
#define sfm(a,m,n)      ll a[m][n]; fo(i,m) fo(j,n) cin>>a[i][j]
#define sfarr(a,n)      ll a[n]; fo(i,n) cin>>a[i]
#define sfv(v,n)        vi v(n); for(ll &i:v) cin>>i
int f[1000001];
int prime[1000001];
void sieve(){
    prime[0]=prime[1]=0;
    For(i,2,1000000) prime[i]=1;
    for(int i=2;i*i<=1000000;i++){
        if(prime[i]){
            for(ll j=i*i;j<=1000000;j+=i)
            prime[j]=0;
        }
    }
}
int power(int a,int b){
    int r=1;
    while(b){
        if(b&1){
            r=(r*1ll*a)%mod;
            b--;
        }
        else{
            a=(a*1ll*a)%mod;
            b>>=1;
        }
    }
    return r;
}
void factorial(){
    f[0]=f[1]=1;
    For(i,2,1000000) f[i]=(f[i-1]*1ll*i)%mod;
}
int nCr(int a,int b){
     factorial();
     int r=f[a]; 
     r=(r*1ll*power(f[b],mod-2))%mod;
     r=(r*1ll*power(f[a-b],mod-2))%mod;
     return r;
}
vi z_algo(string s){
    ll n=s.length(),l=0,r=0;
    vi z(n);
    For(i,1,n-1){
        if(i<=r) z[i]=min(r-i+1,z[i-l]);
        while(z[i]+i<n && s[z[i]]==s[i+z[i]]) z[i]++;
        if(i+z[i]-1>r) l=i,r=i+z[i]-1;
    }
    return z;
}
signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    tc(T){
        int n; cin>>n;
        char c[n][n];
        char t='*';
        vpii v;
        For(i,0,n-1){
            For(j,0,n-1){
                cin>>c[i][j];
                if(c[i][j]==t)
                v.pb(make_pair(i,j));
            }
        }
        if(v[0].ff==v[1].ff || v[0].ss==v[1].ss){
            if(v[0].ff==v[1].ff){
                if(v[0].ff+1<n){
                    c[v[0].ff+1][v[0].ss]=t;
                    c[v[1].ff+1][v[1].ss]=t;
                }
                else{
                     c[v[0].ff-1][v[0].ss]=t;
                     c[v[1].ff-1][v[1].ss]=t;
                }
            }
            else{
                if(v[1].ss+1<n){
                    c[v[0].ff][v[0].ss+1]=t;
                    c[v[1].ff][v[1].ss+1]=t;
                }
                else{
                    c[v[0].ff][v[0].ss-1]=t;
                    c[v[1].ff][v[1].ss-1]=t;
                }
            }
        }
            else{
                c[v[0].ff][v[1].ss]=t;
                c[v[1].ff][v[0].ss]=t;
            }
        
        // cout<<c[v[0].ff][v[1].ss]<<" "<<c[v[1].ff][v[0].ss];
        For(i,0,n-1){
            For(j,0,n-1){
                cout<<c[i][j];
            }
            cout<<"\n";
        }
    }
return 0;
}


```