import qualified Control.Monad as M main :: IO () main = do n <- readLn :: IO Int M.forM_ [1..n] $ \i -> do putStrLn $ unwords . map show $ [1 .. n]