cho.sh
Notes
Loading...

NMK

Time limit

2s

Memory limit

128 MB

Problem

Use each integer from 1 through N exactly once to form a sequence.

The sequence must have longest strictly increasing subsequence length exactly M, and longest strictly decreasing subsequence length exactly K.

Print one sequence satisfying these conditions.

Input

The first line contains three integers N, M, and K.

Output

Print a sequence satisfying the conditions on one line, with numbers separated by spaces.

If no such sequence exists, print -1.

Constraints

  • 1 <= N <= 500
  • 1 <= M, K <= N