import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines K = int(read()) A = [] for n in range(K-1,-1,-1): x = 1 << n A += list(range(x,1<