{$A+,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE $00100000}
{$IMAGEBASE $00400000}
{$APPTYPE CONSOLE}


var i,n:longint;
begin
assign(input,'heapsort.in');
assign(output,'heapsort.out');
reset(input);
rewrite(output);
readln(n);
for i:=n downto 2 do write(i,' ');
writeln('1');
close(input);
close(output);
end.