2016-01-18 18:18:46 +01:00
|
|
|
import Data.List as L
|
|
|
|
main = do content <- getContents
|
2016-01-21 18:33:31 +01:00
|
|
|
putStr $ unlines $ map unwords $ L.transpose $ map (completeMatrix ' ') $ L.transpose $ completeMatrix "" $ map words $ lines $ content
|
2016-01-18 18:18:46 +01:00
|
|
|
where completeMatrix v m = map (\e -> e ++ [v| _ <- [length e .. (\ x -> maximum $ map length x) m ]]) m
|