```
class Solution:
def constructArray(self, n, k):
"""
:type n: int
:type k: int
:rtype: List[int]
"""
from functools import reduce
return list(reduce(lambda x, y: x + y, [[i, k+2-i] for i in range(1, (k+1) // 2 + 1)])) + ([] if k % 2 != 0 else [k // 2 + 1]) + list(range(k+2, n+1))
```