D=' ' p=D*9 "$System.in\n".eachLine{c=it+D*9 2.times{println((0..15).sum{j->(p[j-1,j]-D?'|':' ')+(!it&&p[j]+c[j]-D?'_':' ')*3}-~/ *$/) p=c}}