a = []
k = int(input())
n = k * 2 - 1
a.append(1)
for i in range(1, k):
a.append(a[i - 1] + 1)
for i in range(k, n):
a.append(a[i - 1] - 1)
print(" ".join(map(str, a)))
a = []
k = int(input())
n = k * 2 - 1
a.append(1)
for i in range(1, k):
a.append(a[i - 1] + 1)
for i in range(k, n):
a.append(a[i - 1] - 1)
print(" ".join(map(str, a)))