module Main where import System main :: IO () main = do args <- getArgs mapM_ (\row -> putStrLn (show row)) $ getMatrix (read $ head args ::Int) getMatrix :: Int -> [[Bool]] getMatrix n = take n $ map (take n) ss ss :: [[Bool]] ss = map s [0..] s :: Int -> [Bool] s 0 = cycle [False] s 1 = cycle [True] s n = cycle $ map (!! n) $ take n ss