#include using namespace std; const int maxSize = 101; char forest[maxSize][maxSize]; void reset() { memset( forest, '.', maxSize * maxSize ); } inline bool check( int x, int y, int m ) { return ( x >= 0 && x < m && y >= 0 && y < m ); } int main() { int m, n; ios::sync_with_stdio(false); while ( cin >> m >> n ) { reset(); for ( int i = 0;i> s >> x >> y; if ( x < 0 - 2 || x > m +2 ) continue; if ( y > m || y + s + 2 < 0 ) continue; if ( s == 0 ) { tmpx = x-1; tmpy = y; if ( check( tmpx, tmpy, m ) ) forest[tmpx][tmpy] = '_'; tmpx = x; tmpy = y; if ( check( tmpx, tmpy, m ) ) forest[tmpx][tmpy] = 'o'; tmpx = x+1; tmpy = y; if ( check( tmpx, tmpy, m ) ) forest[tmpx][tmpy] = '_'; } else { int min = y >= 0 ? y : 0; if ( check( x, 0, m ) ) for ( int j = min; j <= y +s && j < m; ++j ) { forest[x][j] = '|'; } tmpx = x-1; tmpy = y; if ( check( tmpx, tmpy, m ) ) forest[x-1][y] = '_'; tmpx = x+1; tmpy = y; if ( check( tmpx, tmpy, m ) ) forest[x+1][y] = '_'; tmpx = x; tmpy = y+s+1; if ( check( tmpx, tmpy, m ) ) forest[x][y+s+1] = '^'; min = y >= 0 ? y+1 : 0; if ( check( x-1, 0, m ) ) for ( int j = min; j <= y +s && j < m; ++j ) { forest[x-1][j] = '/'; } if ( check( x+1, 0, m ) ) for ( int j = min; j <= y +s && j < m; ++j ) { forest[x+1][j] = '\\'; } } } for ( int i = 0; i < m+2; ++i ) cout<<'*'; cout << "\n"; for ( int i = m-1; i>=0; --i ) { cout << "*"; for ( int j = 0; j