# prison-q1
# Section 10, Q.1, p.42
# input: 100

n = int(input("n=? "))
cells = [0]*(n+1)   # 0 means locked
for i in range(1, n+1):        # interval [1, SIZE]
  for j in range(i, n+1, i):
    cells[j] = 1 - cells[j]    # Flip the lock. 0 <--> 1
for i in range(1, n+1):
  if cells[i] == 1:
    print(i, end = ' ')