def triangle(n):
line = []
line1 = []
for i in range(n):
if i < 2:
line.append(1)
print line
else:
line1 = [1]
for k in range(i-1):
line1.append(line[k] + line[k+1])
line1.append(1)
print line1
line = line1