import qualified Data.ByteString.Char8 as BS

main :: IO ()
main = do
  [h,w] <- map (read . BS.unpack) . BS.words <$> BS.getLine :: IO [Int]
  lines <- sequenceA (replicate h BS.getLine)  :: IO [BS.ByteString]
  put lines
  
put :: [BS.ByteString] -> IO ()
put [] = return ()
put (b:bs) = do 
  sequenceA (replicate 2 (BS.putStrLn b))  
  put bs
