import random; k=int(input()); if k==2: print(1,3,2) else: ans=list(range(1,2**k)) random.shuffle(ans) print(" ".join(map(str,ans)))