#include<bits/stdc++.h>
//using namespace gnu_pbds;
using namespace std;
#define ff first
#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 mk(arr,n,type) type arr=new type[n];
#define w(x) int x; cin>>x; while(x--)
mt19937 rng( chrono:: steady_clock :: now ( ) .time_since_epoch ( ) .count ( ) ) ;
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
void c_a_r( )
{
ios_base:: sync_with_stdio ( 0 ) ;
cin .tie ( 0 ) ;
cout .tie ( 0 ) ;
#ifndef ONLINE_JUDGE
freopen ( "input.txt" , "r" , stdin ) ;
freopen ( "output.txt" , "w" , stdout ) ;
#endif
}
void solve( )
{
w( t)
{
loop( i, 1 , n + 1 )
{
loop( j, 1 , m + 1 )
{
if ( a[ i] [ j] == ' ' || a[ i] [ j] == '#' )
{
if ( i > K)
{
ll u = 0 ;
bool ok = 1 , ok2 = 0 ;
for ( ll k = i - 1 ; ( ( k >= 1 ) && ( j - u - 1 ) >= 1 && ( j + u + 1 ) <= m) ;
k-- )
{
if ( ! ( ( a[ k] [ j - u - 1 ] == '*' || a[ k] [ j - u - 1 ] == '#' ) &&
( a[ k] [ j + u + 1 ] == '*' || a[ k] [ j + u + 1 ] == '#' ) ) )
{
ok = 0 ;
break ;
}
ok2 = 1 ;
u++ ;
}
if ( ok && ok2 && u >= K)
{
ll uu = 0 ;
a[ i] [ j] = '#' ;
for ( ll k = i - 1 ; uu < u && k >= 1 ; k-- )
{
if ( a[ k] [ j - uu - 1 ] == '.' a[ k] [ j + uu + 1 ] == '.' ) break ;
a[ k] [ j - uu - 1 ] = '#' ;
a[ k] [ j + uu + 1 ] = '#' ;
uu++ ;
}
}
}
}
}
}
}
}
int32_t main( )
{
c_a_r( ) ;
solve( ) ;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KLy91c2luZyBuYW1lc3BhY2UgZ251X3BiZHM7CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgojZGVmaW5lIGZmICAgICAgICAgICAgICBmaXJzdAojZGVmaW5lIHNzICAgICAgICAgICAgICBzZWNvbmQKI2RlZmluZSBpbnQgICAgICAgICAgICAgbG9uZyBsb25nCiNkZWZpbmUgcGIgICAgICAgICAgICAgIHB1c2hfYmFjawojZGVmaW5lIG1wICAgICAgICAgICAgICBtYWtlX3BhaXIKI2RlZmluZSBwaWkgICAgICAgICAgICAgcGFpcjxpbnQsaW50PgojZGVmaW5lIHZpICAgICAgICAgICAgICB2ZWN0b3I8aW50PgojZGVmaW5lIG1paSAgICAgICAgICAgICBtYXA8aW50LGludD4KI2RlZmluZSBwcWIgICAgICAgICAgICAgcHJpb3JpdHlfcXVldWU8aW50PgojZGVmaW5lIHBxcyAgICAgICAgICAgICBwcmlvcml0eV9xdWV1ZTxpbnQsdmksZ3JlYXRlcjxpbnQ+ID4KI2RlZmluZSBzZXRiaXRzKHgpICAgICAgYnVpbHRpbl9wb3Bjb3VudGxsKHgpCiNkZWZpbmUgenJvYml0cyh4KSAgICAgIF9fYnVpbHRpbl9jdHpsbCh4KQojZGVmaW5lIG1vZCAgICAgICAgICAgICAxMDAwMDAwMDA3CiNkZWZpbmUgaW5mICAgICAgICAgICAgIDFlMTgKI2RlZmluZSBwcyh4LHkpICAgICAgICAgZml4ZWQ8PHNldHByZWNpc2lvbih5KTw8eAojZGVmaW5lIG1rKGFycixuLHR5cGUpICB0eXBlIGFycj1uZXcgdHlwZVtuXTsKI2RlZmluZSB3KHgpICAgICAgICAgICAgaW50IHg7IGNpbj4+eDsgd2hpbGUoeC0tKQptdDE5OTM3ICAgICAgICAgICAgICAgICBybmcoY2hyb25vOjpzdGVhZHlfY2xvY2s6Om5vdygpLnRpbWVfc2luY2VfZXBvY2goKS5jb3VudCgpKTsKCi8vdHlwZWRlZiB0cmVlPGludCwgbnVsbF90eXBlLCBsZXNzPGludD4sIHJiX3RyZWVfdGFnLCB0cmVlX29yZGVyX3N0YXRpc3RpY3Nfbm9kZV91cGRhdGU+IHBiZHM7CgoKdm9pZCBjX2FfcigpCnsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oMCk7CiAgICBjaW4udGllKDApOwogICAgY291dC50aWUoMCk7CiNpZm5kZWYgT05MSU5FX0pVREdFCiAgICBmcmVvcGVuKCJpbnB1dC50eHQiLCAiciIsIHN0ZGluKTsKICAgIGZyZW9wZW4oIm91dHB1dC50eHQiLCAidyIsIHN0ZG91dCk7CiNlbmRpZgp9CgoKdm9pZCBzb2x2ZSgpCnsKCiAgICB3KHQpCiAgICB7CgogICAgICAgIGxvb3AoaSwgMSwgbiArIDEpCiAgICAgICAgewogICAgICAgICAgICBsb29wKGosIDEsIG0gKyAxKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBpZiAoYVtpXVtqXSA9PSAnICcgfHwgYVtpXVtqXSA9PSAnIycpCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGkgPiBLKQogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgbGwgdSA9IDA7CiAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgb2sgPSAxLCBvazIgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxsIGsgPSBpIC0gMTsgKChrID49IDEpICYmIChqIC0gdSAtIDEpID49IDEgJiYgKGogKyB1ICsgMSkgPD0gbSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgay0tKQogICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoISgoYVtrXVtqIC0gdSAtIDFdID09ICcqJyB8fCBhW2tdW2ogLSB1IC0gMV0gPT0gJyMnKSAmJgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVtrXVtqICsgdSArIDFdID09ICcqJyB8fCBhW2tdW2ogKyB1ICsgMV0gPT0gJyMnKSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2sgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgb2syID0gMTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUrKzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAob2sgJiYgb2syICYmIHUgPj0gSykKICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGwgdXUgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYVtpXVtqXSA9ICcjJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGwgayA9IGkgLSAxOyB1dSA8IHUgJiYgayA+PSAxOyBrLS0pCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFba11baiAtIHV1IC0gMV0gPT0gJy4nICBhW2tdW2ogKyB1dSArIDFdID09ICcuJykgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVtrXVtqIC0gdXUgLSAxXSA9ICcjJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhW2tdW2ogKyB1dSArIDFdID0gJyMnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHV1Kys7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgfQp9CmludDMyX3QgbWFpbigpCnsKICAgIGNfYV9yKCk7CgogICAgc29sdmUoKTsKCn0K
compilation info
prog.cpp: In function ‘void solve()’:
prog.cpp:45:14: error: ‘i’ was not declared in this scope
loop(i, 1, n + 1)
^
prog.cpp:45:20: error: ‘n’ was not declared in this scope
loop(i, 1, n + 1)
^
prog.cpp:45:9: error: ‘loop’ was not declared in this scope
loop(i, 1, n + 1)
^~~~
prog.cpp:45:9: note: suggested alternative: ‘logl’
loop(i, 1, n + 1)
^~~~
logl
stdout