D. Optimal Number Permutationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have array a that contains all integers from 1 to n twice. You can arbitrary permute any numbers in a.Let number i be in positions xi, yi (xi < yi) in the permuted array a. Let's define the value di = yi - xi — the distance between the positions of the number i. Permute the numbers in array a to minimize the value of the sum .InputThe only line contains integer n (1 ≤ n ≤ 5·105).OutputPrint 2n integers — the permuted array a that minimizes the value of the sum s.ExamplesInput2Output1 1 2 2Input1Output1 1
Input2
Output1 1 2 2
['constructive algorithms', '*1900']