program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
  var
f,f1:text;
mas:array[1..50000] of integer;
i,n:integer;
begin
assign(f,'heapsort.in');
reset(f);
readln(f,n);
close(f);
for i:=1 to n do
mas[i]:=n-i+1;
assign(f1,'heapsort.out');
rewrite(f1);
for i:=1 to n do write(f1,mas[i],' ');
close(f1);
end.
