def triangles():
s = []
m = 1
while 1:
s.append(1)
yield s
s = [s[x]+s[m - x] for x in range(1,m)]#不包含头尾两个1
s.insert(0,1)
m = m + 1
n = 0
for t in triangles():
print(t)
n = n + 1
if n == 10:
break
s = []
m = 1
while 1:
s.append(1)
yield s
s = [s[x]+s[m - x] for x in range(1,m)]#不包含头尾两个1
s.insert(0,1)
m = m + 1
n = 0
for t in triangles():
print(t)
n = n + 1
if n == 10:
break