import sys input = sys.stdin.readline N=int(input()) A=[i*3 for i in range(N)] B=[i*3+10 for i in range(N)] i=-1 while sum(A)<=sum(B)-3: if A[i]+3<10000: A[i]+=3 else: i-=1 i=0 while sum(A)!=sum(B): if A[i]+1<10000: A[i]+=1 i+=1 else: i+=1 print(*A) print(*B)