a=(" "*19+$/)*19 i=?” m=607254*$$ (chop!;$_.reverse!if 0>o=[1,-20,-1,20][3&m/=4];$_.bytes{|c|a[i+=o]=c})while gets puts a.split /\s+^/