main=interact$(%(=<<).(?)).lines x%g=do(a,b)<-zip("":x)$x++x;g" _"b&g"|_"a&(' ':g" |"a)++"\n" (a:x)&(b:y)=max a b:x&y;x&y=x++y x?'.'=x;_?_=" "