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