import random k = int(input()) n = 2 ** k a = [i for i in range(1, n)] if n > 4: random.shuffle(a) print(*a)