VAR I,J,K,L,N,M         : LONGINT;
BEGIN
 Assign(input,'heapsort.in');
 Reset(input);
  read(n);
 Close(input);
 Assign(output,'heapsort.out');
 Rewrite(output);
  for i:=n downto 1 do
   write(i,' ');
 Close(output);
END.