n=int(input()) a=[i for i in range(1,n+1,3)] if a[-1]>4: a.append(a[-1]-1) a[-1],a[-2]=a[-2],a[-1] print(*a)