l=range(1,input()+1) for x in l:print x;del l[x-1%x::x+1/x]