#########################################################
#                                                       #
#    Coded by Indranil Ghosh (indranilg49@gmail.com)    #     
#                                                       #
#########################################################

#Python 2.7.11, OEIS sequence: A286588


from sympy import prime, factorint, floor, log

def A(n): return n - 2**int(floor(log(n, 2)))

def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))

def P(n):
    f = factorint(n)
    return sorted([f[i] for i in f])

def a046523(n):
    x=1
    while True:
        if P(n) == P(x): return x
        else: x+=1

def a278222(n): return a046523(b(n))

def a057889(n):
    x=bin(n)[2:]
    y=x[::-1]
    return int(str(int(y))+(len(x) - len(str(int(y))))*'0', 2)

def a(n): return a278222(a057889(3*n)/3)

print [a(n) for n in xrange(101)]