{$APPTYPE CONSOLE}
program heapsort;

const
        st1='heapsort.in';
        st2='heapsort.out';
var
        x,n:longint;
{******************}
procedure look;
begin
        assign(input,st1); reset(input);
        assign(output,st2); rewrite(output);

        readln(n);
end;
{******************}
procedure action;
begin
        for x:=n downto 1 do write(x,' ');
end;
{******************}
procedure finish;
begin
        close(input); close(output);
end;
{******************}
begin
        look;
        action;
        finish;
end.
