s=(' -'*input()+'|+')*3 for c in s[:-2:2]:print s[c>s:-2:2]