import Data.List
main = do
  n <- readLn
  let m = f [1..n]
  mapM_ printT $ nub . concat . map (\(x,ys) -> map (\z -> (min x z,max x z)) ys) $ map (\(x,y)-> (x, concat y)) [ (b,p) | a <- m, b <- a, let p = filter (/= a) m]
  
f [] = []
f [x] = [[x]]
f (x:y:zs) = [x,y] : f zs

printT (a,b) = putStrLn $ show a ++ " " ++ show b