for inputTS in input(): print ''.join(str(v) for v in inputTS) for b in[-1]+inputTS:exec["p=b>0;d=2;s=1;t=2","d+=b/2*(-2<d+b<6)","s+=b/3*(-3<s+b<5)","t=3-t"][abs(b)-1] i=c=(s>0)*d*p q='print" |"[s/2]*t+" "*i+t*%r;' exec('i-=1;'+q%'/')*c print"L "+" -="[t]*2*d*p exec(q%'\\'+'i+=1;')*c
[[1,2,-3,4],[1,4,-3,2,2,4,3,3,3,-2],[1,4,2,-1,-3,1,4,-3,-3,2,2],[1,3,2,4,-2,-3],[1,3,4],[1,-2,-2,-2,1,4,-3,-3,-3]]
12-34 L ------ 14-3224333-2 || // || // ||// L ====== ||\\ || \\ || \\ 142-1-314-3-322 L -------- 1324-2-3 / / L ---- \ \ 134 | / |/ L ---- |\ | \ 1-2-2-214-3-3-3 L ----