program taskH;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
A:array[1..50000] of integer;
W,N,I:integer;
{
procedure heapsort(L,R:integer);
var W:integer;
begin
 W:=
end;
}
begin
{N:=6;
}
assign(input,'heapsort.in');reset(input);readln(N);
assign(output,'heapsort.out');rewrite(output);
for i:=1 to N do A[i]:=N-i+1;
{for i:=N downto 2 do
begin
 W:=A[i];A[i]:=A[1];A[1]:=W;
 heapsort(1,i-1);
end;
}
for i:=1 to N-1 do write(A[i],' ');
writeln(A[N]);
close(output);
end.
