a=[] exec'R=range(2**len(a));a=[[a[j]for j in R if 2**j&i]or 0for i in R];'*input() print`a`.replace(*"[{").replace(*"]}")