main=readLn>>=mapM putStrLn.f;(#)=replicate;a n=n#'+';b n=n#' '++"+";c m n=n#b n++a m:n#b n;f n=c n$div n 2