main=readLn>>=putStr.i f n c=concat$take n$repeat c i n=j(j" ""|"n)(j"-""+"n)n j a b n=f n a++g++g++"\n"where g=b++f n a