#K45512. Distinct Integer Sequence

    ID: 27770 Type: Default 1000ms 256MiB

Distinct Integer Sequence

Distinct Integer Sequence

You are given an integer N. Your task is to generate a sequence of N distinct positive integers A1, A2, ..., AN that satisfies the following properties:

  • The sum of the integers equals \(\frac{N(N+1)}{2}\).
  • The product of the integers equals \(N!\) (the factorial of N).

The simplest sequence that meets these conditions is \([1, 2, 3, ..., N]\), so you are required to output this sequence.

Example:

Input: 3
Output: 1 2 3

inputFormat

The input consists of a single line containing an integer N (\(1 \leq N \leq 10^5\)).

outputFormat

Output the sequence of N integers separated by a space. The sequence must be \([1, 2, 3, \dots, N]\).

## sample
1
1