a = list(range(11))
print(*a)
n = len(a)
while n > 0:
print(a[(len(a) - n) // 2], end=" ")
if n > 1:
print(a[(len(a) + n) // 2 - 1], end = " ")
n -= 2
print()
a = list(range(11))
print(*a)
n = len(a)
while n > 0:
print(a[(len(a) - n) // 2], end=" ")
if n > 1:
print(a[(len(a) + n) // 2 - 1], end = " ")
n -= 2
print()