Under construction

Still being built. Things may change

Another Sequence Problem

Interview

Time limit1sMemory limit1024 MB

Summary
Print N distinct integers from 1 to 10^9 so that for every pair, the sum of the two does not divide their product.
Level

Medium4 of 10

Topics
Number theory, Math
Solved
No attempts yet

Problem

Print a sequence A={A1,A2,…,AN}A=\{A_{1},A_{2},\dots,A_{N}\} of length NN that satisfies the following condition.

For all integers ii and jj with 1≤i<j≤N1\leq i<j \leq N, the following conditions hold.

  • Ai≠AjA_{i}\neq A_{j}, and every element of AA is an integer from 11 to 10910^{9} inclusive.
  • Ai+AjA_{i}+A_{j} is not a divisor of Ai×AjA_{i}\times A_{j}.

Input

The first line contains the integer NN, the length of sequence AA. (2≤N≤5 0002\leq N \leq 5\,000)

Output

On the first line, print the elements of sequence AA separated by spaces.

If several sequences satisfy the conditions, print any of them.

Examples1

  1. Example 1

    Input
    3
    
    Expected output
    1 4 9