s=""io.read"*a":gsub("(%S+).(%S*)",function(a,b)print(s..a)s=(" "):rep(#s+#a-#b)print(s..b:reverse())end)