# 题目

n , m ⩽ 20 n,m\leqslant 20

# 思路

/...\   -->   \.../
\.../         /...\


# 代码

#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cctype>
#include <queue>
using namespace std;
# define rep(i,a,b) for(int i=(a); i<=(b); ++i)
# define drep(i,a,b) for(int i=(a); i>=(b); --i)
typedef long long llong;

int a = 0, c = getchar(), f = 1;
for(; !isdigit(c); c=getchar())
if(c == '-') f = -f;
for(; isdigit(c); c=getchar())
a = (a<<3)+(a<<1)+(c^48);
return a*f;
}

const int MAXN = 22;
int n, m, a[MAXN][MAXN];
priority_queue< pair<int,int> > pq;
int r[MAXN], c[MAXN], id[MAXN];
bool cmp(const int &_x,const int &_y){

return r[_x] < r[_y];
}
queue<int> bin;
int main(){

std::sort(id+1,id+n+1,cmp);
rep(i,1,m){

pq.push(make_pair(c[i],i));
}
drep(i,n,1){

while(r[id[i]] --){

if(pq.empty()) // nothing to choose
return puts("IMPOSSIBLE"), 0;
int v = pq.top().second; pq.pop();
a[id[i]][v] = 1;
if(-- c[v]) bin.push(v);
}
for(; !bin.empty(); bin.pop()){

int x = bin.front();
pq.push(make_pair(c[x],x));
}
}
rep(j,1,m) if(c[j] != 0)
return puts("IMPOSSIBLE"), 0;
for(bool ok=false; !ok&&(ok=true); )
rep(i,1,n-1) for(int j=1,k=m; j<k; ){

while(j <= m && (a[i][j] == a[i+1][j] || !a[i][j])) ++ j;
while(k && (a[i][k] == a[i+1][k] || a[i][k])) -- k;
if(j < k){

a[i+1][j] = a[i][k] = 1;
a[i][j] = a[i+1][k] = 0, ok = false;
}
}
puts("POSSIBLE");
rep(i,1,n){

rep(j,1,m)
if(a[i][j]) putchar('/');
else putchar('\\');
putchar('\n');
}
return 0;
}
`