program Task_H;

{$APPTYPE CONSOLE}
var
  i, N: Integer;

begin
  Assign(input, 'heapsort.in');
  Reset(input);
  Assign(output, 'heapsort.out');
  ReWrite(output);
  ReadLn(N);
  for i := N downto 1 do
    Write(i, ' ');
end.
