link a b = [a] ++ [b]

insertSpace xs = if last xs == '\n' then xs else xs ++ "\n"

solve (xs:ys:_) = concat $ zipWith link xs (ys ++ "\n")

main = putStr . insertSpace . solve . lines =<< getContents