import qualified Data.ByteString.Char8 as B

main :: IO ()
main = solve . tail <$> readParams >>= B.putStrLn

readParams :: IO [B.ByteString]
readParams = B.words <$> B.getContents

solve :: [B.ByteString] -> B.ByteString
solve = B.concat . B.transpose
