Determine if there exists a sequence obtained by permuting 1,2,...,N that satisfies the following conditions:
 - The length of its longest increasing subsequence is A.
 - The length of its longest decreasing subsequence is B.
If it exists, construct one such sequence.

-----Notes-----
A subsequence of a sequence P is a sequence that can be obtained by extracting some of the elements in P without changing the order.
A longest increasing subsequence of a sequence P is a sequence with the maximum length among the subsequences of P that are monotonically increasing.
Similarly, a longest decreasing subsequence of a sequence P is a sequence with the maximum length among the subsequences of P that are monotonically decreasing.

-----Constraints-----
 - 1 \leq N,A,B \leq 3\times 10^5
 - All input values are integers.

-----Input-----
Input is given from Standard Input in the following format:
N A B

-----Output-----
If there are no sequences that satisfy the conditions, print -1.
Otherwise, print N integers. The i-th integer should be the i-th element of the sequence that you constructed.

-----Sample Input-----
5 3 2

-----Sample Output-----
2 4 1 5 3

One longest increasing subsequence of this sequence is {2,4,5}, and one longest decreasing subsequence of it is {4,3}.

Difficulty: competition

Starter code:

Solutions:
n,a,b = map(int,input().split())
if a+b>n+1 or a*b<n:
  print(-1)
  return
ans = []
for i in range(1,a+1):
  ans.append(i*b)
if b == 1:
  x = list(range(1,n+1))
  print(*x)
  return
x = (n-a)//(b-1)
y = (n-a)%(b-1)
for i in range(1,b):
  for j in range(1,x+1):
    ans.append(j*b-i)
  if i <= y:
    ans.append((x+1)*b-i)
ans_true = []
for i,x in enumerate(ans):
  ans_true.append((i+1,x))
ans_true.sort(key=lambda x:x[1])
x = list(zip(*ans_true))[0]
print(*x)

N, A, B = map(int, input().split())
    
if N < A + B - 1 :
    print(-1)

else :
    if A > B :
        mode = 0
        A -= 1
    else :
        mode = 1
        B -= 1
        
    ret = []
    u = N - A + 1
    l = B
    while len(ret) < N :
        if (mode and A == 0) or (not mode and B == 0) :
            ret = [-1]
            break
            
        if mode :
            for i in range(max(u, l - B + 1), u + A) :
                ret.append(i)
            A -= 1
            u -= A
            mode ^= 1
        else :
            for i in range(min(l, u + A - 1), l - B, -1) :
                ret.append(i)
            B -= 1
            l += B
            mode ^= 1
            
    print(*ret)

N,A,B = map(int,input().split())
if A+B > N+1 or A*B < N:
    print(-1)
    return

ls = [1]*B
rem = N-B
i = 0
while rem > 0:
    r = min(A-1, rem)
    ls[i] += r
    rem -= r
    i += 1

bs = [[] for _ in range(B)]
n = 1
for j,l in enumerate(ls):
    for i in range(l):
        bs[j].append(n)
        n += 1
ans = []
for b in reversed(bs):
    ans += b
print(*ans)

import sys
input = sys.stdin.readline
n, a, b = map(int,input().split())
nn = n
bb = b

if (n+b-1)//b <= a <= n+1-b:
    ANS = []
    L = [a]
    b -= 1
    n -= a
    for i in range(b):
        L.append(1)
        n -= 1
    ind = 1
    while n > 0:
        p = min(n, a-1)
        L[ind] += p
        n -= p
        ind += 1

    # print(L)

    i = nn
    for j in range(bb):
        i -= L[j]
        for k in range(L[j]):
            ANS.append(i + k + 1)
        
    print(*ANS)
else:
    print(-1)

# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return list(map(int, input().split()))
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N, A, B = MAP()

if A * B < N:
    print((-1))
    return
if A + B > N+1:
    print((-1))
    return
if A == 1 and B != N or B == 1 and A != N:
    print((-1))
    return
remain = N - A
if remain < B - 1:
    print((-1))
    return
d, m = divmod(remain, B-1) if B > 1 else (0, 0)
if d > A:
    print((-1))
    return
li = [[] for i in range(B)]
li[0] = list(range(1, A+1))
j = A + 1
for i in range(1, B):
    tmp = []
    for _ in range(d):
        tmp.append(j)
        j += 1
    if m > 0:
        tmp.append(j)
        j += 1
        m -= 1
    li[i] = tmp
li = li[::-1]
ans = []
for grp in li:
    ans += grp
print((*ans))


import sys

N,A,B = list(map(int,input().split()))

if A+B-1 > N or A*B < N:
    print((-1))
    return

ans = []

for i in range(N-A+1,N+1,1):
    ans.append(i)

now = []
for i in range(1,N-A+1,1):

    now.append(i)

    if len(now) == B-1:
        now.reverse()

        for j in now:
            ans.append(j)
        now = []

now.reverse()
for j in now:
    ans.append(j)

print((" ".join(map(str,ans))))


N, A, B = list(map(int, input().split()))

ans = list(range(A))
m = 0
rest = N - A
B -= 1
if rest < B:
  print((-1))
  return
if rest / A > B:
  print((-1))
  return

while rest > B:
  s = min(A, rest - B + 1)
  ans += list(range(m - s, m))
  m -= s
  rest -= s
  B -= 1

ans += list(range(m - B, m))[::-1]
m -= B

print((" ".join([str(x - m + 1) for x in ans])))


# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, A, B = lr()
if A + B - 1 > N:
    print((-1)); return
if A * B < N:
    print((-1)); return

if B == 1:
    q, r = A, 0
else:
    q, r = divmod(N-A, B-1)

if q == A:
    size = [B] * q
else:
    size = [B] * q + [r+1] + [1] * (A-q-1)

end = 1
answer = []
for s in size:
    start = end + s - 1
    answer.extend(list(range(start, end-1, -1)))
    end = start + 1

print((*answer))


def main():
    N, A, B = list(map(int, input().split()))

    if not (((N - 1) // A + 1) <= B <= (N - A) + 1):
        print((-1))
        return

    if B == 1:
        print((*list(range(1, N + 1))))
        return

    q, r = divmod(N - A, B - 1)

    ctr = [A]
    ctr += [q] * (B - 1 - r)
    ctr += [q + 1] * r

    ans = []
    ma = N
    for x in ctr:
        ans += list(range(ma - x + 1, ma + 1))
        ma -= x
    print((*ans))


def __starting_point():
    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())

__starting_point()

N, A, B = map(int, input().split())

if A + B - 1 > N or A * B < N:
    print(-1)
    return

ans = []

x = N - A
cur = 1
while cur <= N:
    y = min(x + 1, B)
    ans += list(reversed(range(cur, cur + y)))
    cur += y
    x -= y - 1

print(*ans)

n, a, b = [int(item) for item in input().split()]
if n < a + (b-1) or n > a + (b-1) * a:
    print(-1)
    return
for i in range(a):
    print(n - a + i + 1, end=" ")
n -= a
if n == 0:
    print("")
    return
loop = n // (b-1)
option = n % (b-1)
for j in range(b-1):
    if option > 0:
        for i in range(loop+1):
            print(n - loop - 1 + i + 1, end=" ")
        n -= loop + 1
        option -= 1
    else:
        for i in range(loop):
            print(n - loop + i + 1, end=" ")
        n -= loop
print("")

import math

j = list(map(int, input().split()))
n = j[0]
a = j[1]
b = j[2]
if (n < a + b - 1) or (n > a * b):
    print((-1))
    return

ans = list(range(b, 0, -1))
if (n > b):
    counter = len(ans)
    loopcounter = 1
    #sikii = math.ceil((n-b) / (a-1))
    sikii = b
    yoyuu = n - a -b+1
    while (counter < n):
        if (yoyuu >= sikii):
            ans += list(range(counter + sikii, counter, -1))
            yoyuu -= (sikii - 1)
        elif (yoyuu == 0):
            ans += [counter + 1]
        else:
            ans += list(range(counter + yoyuu + 1, counter, -1))
            yoyuu = 0
        loopcounter += 1
        counter = len(ans)

print((' '.join(map(str, ans))))


def distribute(n, person, min, max, mode="even"):
    # n 個を person 人に分配する
    # 返り値は [[a (個), a 個もらう人数], ...]
    # 分配できないときは None を返す
    if person==0 and n==0:
        return []
    elif not min*person <= n <= max*person:
        return None
    elif mode=="even":
        q, m = divmod(n, person)
        if m==0:
            return [[q, person]]
        else:
            return [[q, person-m], [q+1, m]]
    elif mode=="greedy":
        if max==min:
            return [[max, person]]
        n -= min * person
        q, m = divmod(n, max-min)
        if m==0:
            return [[min, person-q], [max, q]]
        else:
            return [[min, person-1-q], [min+m, 1], [max, q]]
    else:
        raise ValueError("'mode' must be 'even' or 'greedy'.")

import numpy as np
N, A, B = list(map(int, input().split()))
Ans = np.arange(N, 0, -1, dtype=np.int64)
Ans[:A] = np.flipud(Ans[:A])
c = N-A
D = distribute(c, B-1, min=1, max=A, mode="greedy")
if D is None:
    print((-1))
    return
idx = A
for p, n in D:
    for n_ in range(n):
        Ans[idx:idx+p] = np.flipud(Ans[idx:idx+p])
        idx += p
print((" ".join(str(int(a)) for a in Ans)))


N,A,B = map(int,input().split())
if not (A+B-1 <= N <= A*B):
    print(-1)
    return
if B == 1:
    print(*list(range(1,A+1)))
    return

n = (N-A)//(B-1)
m = (N-A)%(B-1)

stack = [1,A+1]
lds_cnt = 1
while stack[-1] <= N:
    l = n if lds_cnt > m else n+1
    stack.append(stack[-1] + l)
    lds_cnt += 1

ans = []
while len(stack) > 1:
    ans += list(range(stack[-2], stack[-1]))
    stack.pop()
print(*ans)

N, A, B = list(map(int, input().split()))
ans = []
 
if A+B-1<=N<=A*B:
    S = N-A
    cur = N
    ans = []
    for i in range(A+1):
        num = min(B-1, S)+1
        S -= num-1
        for j in range(num):
            ans.append(cur-num+1+j)
        cur -= num
    ans = ans[::-1][1:]
    print((*ans))
else:
    print((-1))


n,a,b=map(int,input().split())
ans=[];L=[a]*b;x=a*b-n;ct=1
if a+b>n+1 or x<0:print(-1);return
for i in range(b-1,0,-1):
 y=min(a-1,x);L[i]-=y;x-=y
for i in L:
 l=[]
 for j in range(i):
  l+=[str(ct)];ct+=1
 ans+=[' '.join(l)]
print(*reversed(ans))

import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))

#################

# Aは単調減少列の右端から選べる
# Bは ceil(N/A) ~ N-A+1 を取れる

N,A,B = LI()

if math.ceil(N/A) <= B <= N-A+1:
    numl = [1]*A  # 各単調減少列の要素数
    numl[0] = B
    left = N-A-B+1
    for i in range(1,A):
        val = min(left,B-1)
        numl[i] += val
        left -= val
    ans = []
    now = 1
    for i in range(A):
        ans.extend(list(reversed(range(now,now+numl[i]))))
        now += numl[i]
    print(*ans)
else:
    print(-1)

import sys

input_methods=['clipboard','file','key']
using_method=1
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	#a = int(input())
	n, a, b = tin()
	#s = input()
	if n < a+b-1:
		return -1
	if n > a*b:
		return -1
	if a == 1:
		print(*list(range(n,0,-1)))
		return 
	if b==1:
		print(*list(range(1, n+1)))
		return 
	
	al = list( range(1, n+1))
	cc = (n - a) // (b-1)
	amari = (n - a) % (b-1)
	ret = al[-a:]
	st=n-a
	for bi in range(b-1):
		na = cc + (1 if bi < amari else 0)
		st -= na
		for ai in range(na):
			ret.append(al[st+ai])
	print(*ret)
		
		
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

def __starting_point():
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)
__starting_point()

import math
#import numpy as np
import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    n,a,b = list(map(int,ipt().split()))
    if a*b < n or a+b-1 > n:
        print((-1))
        return
    ans = [str(b-i) for i in range(b)]
    si = n-a+2
    ue = n+1
    i = 0
    while True:
        if si <= b or a == 1:
            break
        ans[i] += " "+" ".join(map(str,list(range(si,ue))))
        ue = si
        si -= a-1
        i += 1
    if i < b and b+1 < ue:
        ans[i] += " "+" ".join(map(str,list(range(b+1,ue))))
    print((" ".join(ans)))
    return

def __starting_point():
    main()

__starting_point()

N, A, B = map(int, input().split())
ans = []
 
if A+B-1<=N<=A*B:
    S = N-A
    cur = N
    ans = []
    for i in range(A+1):
        num = min(B-1, S)+1
        S -= num-1
        for j in range(num):
            ans.append(cur-num+1+j)
        cur -= num
    ans = ans[::-1][1:]
    print(*ans)
else:
    print(-1)

from bisect import bisect


def LIS(L):
    INF, N = 10**12, len(L)
    seq = [INF] * N
    for i in L:
        seq[bisect(seq, i)] = i
    return N - seq.count(INF)

N,A,B = list(map(int,input().split(" ")))

if N < (A + B - 1) or N > (A * B):
	print((-1))
	return

if B == 1 and A == N:
	seq = [str(n) for n in range(1,N+1)]
	print((' '.join(seq)))
	return

seq = [str(num)for num in range(N-A+1,N+1)]
dif = (A * B - N)
div = A - (dif // (B-1))
mer = (dif % (B-1))

n = N - A
for i in range((B-1) - mer):
	for j in range(n-(div)+1,n+1):
		seq.append(str(j))
	n -= (div)

for i in range(mer):
	for j in range(n-div+2,n+1):
		seq.append(str(j))
	n -= (div - 1)

print((' '.join(seq)))


def examC():
    N = LI(); N.sort()
    if N[0]==1:
        if N[1]==1:
            ans = 1
        else:
            ans = max(0,N[1]-2)
    else:
        ans = (N[1]-2)*(N[0]-2)
    print(ans)
    return

def examD():
    N, K = LI()
    ans = 0
    b = K+1
    while(b<=N):
        cur = N//b * (b-K) + max(0,N%b - K+1)
        if cur==N+1:
            cur = N
        ans += cur
        b += 1
#        print(ans)
    print(ans)
    return

def examE():
    N, A, B = LI()
    if N<A+B-1 or N>A*B:
        print(-1)
        return
    ans = []
    cur = N
    num = N
    rest = B - 1
    #print(rest)
    for i in range(B):
        cur -= A
        if cur<=rest:
            cur += A
            break
        for j in range(A):
            if num==rest:
                break
            ans.append(cur+1)
            cur += 1
            num -= 1
        cur -= A
        rest -= 1
    for i in range(rest,cur):
        ans.append(i+1)
    cur = rest
    for j in range(rest):
        ans.append(cur)
        cur -= 1
    print(" ".join(map(str,ans)))
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
nonlocal mod,mod2,inf,alphabet
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
alphabet = [chr(ord('a') + i) for i in range(26)]

def __starting_point():
    examE()

"""

"""
__starting_point()

import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

#a = list(map(int, input().split()))

#####################################


#2:26
n,a,b = list(map(int, input().split()))
ans=[]
if(n<a+b-1 or n>a*b):
    print(-1)
else:
    if(b>=2):
        x = (n-a)//(b-1)
        y = (n-a)%(b-1)
    else:
        x=1
        y=1
    times=[0 for i in range(b-1)]
    for i in range(a):
        ans.append(n-a+i+1)
    for i in range(b-1):
        if(i<y):
            times[i]=x+1
        else:
            times[i]=x
    now = n-a
    for i in range(b-1):
        now -= times[i]
        for j in range(times[i]):
            ans.append(now+j+1)
print(' '.join(map(str,ans)))

import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


N, A, B = list(map(int, sys.stdin.buffer.readline().split()))
if A * B < N:
    print((-1))
    return
if N < A + B - 1:
    print((-1))
    return

groups = [[] for _ in range(A)]
nums = deque(list(range(1, N + 1)))
for i in reversed(list(range(len(groups)))):
    groups[i].append(nums.pop())
for i in range(len(groups)):
    nums.append(groups[i].pop())
    for _ in range(B):
        if not nums:
            break
        groups[i].append(nums.popleft())

ans = []
for g in groups:
    ans += g[::-1]
print((*ans))


def solve(n, a, b):
    if n < a + b - 1:
        return [-1]
    if n > a * b:
        return [-1]
    if b == 1:
        return list(range(1, n + 1))
    if a == 1:
        return list(range(n, 0, -1))

    ans = list(range(b, 0, -1))
    ans.extend(list(range(n - a + 2, n + 1)))

    t = b
    for t in range(2 * b - 1, n - a + 1, b - 1):
        ans.extend(list(range(t, t - b + 1, -1)))
    ans.extend(list(range(n - a + 1, t, -1)))
    return ans


n, a, b = list(map(int, input().split()))
print((*solve(n, a, b)))


# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return list(map(int, input().split()))
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N, A, B = MAP()

if A == 1 and B != N or B == 1 and A != N:
    print((-1))
    return
remain = N - A
if remain < B - 1:
    print((-1))
    return
d, m = divmod(remain, B-1) if B > 1 else (0, 0)
li = [[] for i in range(B)]
li[0] = list(range(1, A+1))
j = A + 1
for i in range(1, B):
    tmp = []
    for _ in range(d):
        tmp.append(j)
        j += 1
    if m > 0:
        tmp.append(j)
        j += 1
        m -= 1
    if len(tmp) > A:
        print((-1))
        return
    li[i] = tmp
li = li[::-1]
ans = []
for grp in li:
    ans += grp
print((*ans))


n, m, k = map(int,input().split())
if not m+k-1 <= n <= m*k:
    print(-1)
    return

streak = [1]*k
streak[0] = m
i = 1
for increment in range(n-m-k+1):
    if streak[i] == m: i+= 1
    streak[i]+= 1
seq = list(range(n, 0, -1))

i = 0
for s in streak:
    subseq = seq[i:i+s]
    seq[i:i+s] = subseq[::-1]
    i+= s
print(*seq)

N, A, B = list(map(int, input().split()))
if A*B < N or A+B-1 > N:
    print((-1))
else:
    array = [i for i in reversed(list(range(1, N+1)))]
    if A > 1:
        f = array[:B]
        r = array[B:]
        L = [f]
        span = len(r)//(A-1)
        rem = len(r)%(A-1)
        i = 0
        for _ in range(A-1):
            if rem > 0:
                L.append(r[i:i+span+1])
                rem -= 1
                i += span + 1
            else:
                L.append(r[i:i+span])
                i += span
        array = []
        for l in reversed(L):
            array += l
    print((' '.join([str(a) for a in array])))


import typing
import sys
import math
import collections
import bisect
import itertools
import heapq
import decimal
import copy
import operator

# sys.setrecursionlimit(10000001)
INF = 10 ** 20
MOD = 10 ** 9 + 7
# MOD = 998244353
# buffer.readline()


def ni(): return int(sys.stdin.readline())
def ns(): return list(map(int, sys.stdin.readline().split()))
def na(): return list(map(int, sys.stdin.readline().split()))
def na1(): return list([int(x)-1 for x in sys.stdin.readline().split()])


# ===CODE===

def main():
    n, a, b = ns()

    res = collections.deque()
    if a+b > n+1:
        print((-1))
        return

    flg = a < b
    a, b = max(a, b), min(a, b)

    head = [i+1 for i in range(b)]
    head.reverse()
    tail = []

    remain = n-b-a+1
    if remain < 0:
        print((-1))
        return

    v = b+1
    for i in range(a-1):
        tmp = [v]
        v += 1
        while len(tmp) < b and remain > 0:
            tmp.append(v)
            v += 1
            remain -= 1
        tmp.reverse()
        tail += tmp

    if remain != 0:
        print((-1))
        return

    res = head+tail
    if flg:
        for i in range(n):
            res[i] = n+1-res[i]
    print((*res))


def __starting_point():
    main()

__starting_point()

import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    n,a,b=map(int,input().split())
    if(a+b>n+1):
        print(-1)
        return
    if(a*b<n):
        print(-1)
        return

    ans=list(range(b,0,-1))
    now=b
    d=a*b-n
    for _ in range(a-1):
        k=min(d,b-1)
        d-=k
        next=now+(b-k)
        for i in range(next,now,-1):
            ans.append(i)
        now=next

    print(*ans)
resolve()

from bisect import bisect_left
n, a, b = list(map(int, input().split()))

if n < a + b - 1 or a * b < n:
    print((-1))
    return

ans = []
now = a
for i in range(a, 0, -1):
    ans.append(i)

iran = a * b - n
now = a
for i in range(1, b):
    # このぐるーぷでは何個削るか
    not_need = min(iran, a - 1)
    iran -= not_need
    need = a - not_need

    prev = now
    now += need
    for j in range(now, prev, -1):
        ans.append(j)
print((*reversed(ans)))


import sys
n,a,b=map(int,input().split())
if a+b>n+1 or a*b<n:
  print(-1)
  return

ans=[]
L=[a]*b
x=a*b-n
for i in range(1,b):
  L[i]-=min(a-1,x)
  x-=min(a-1,x)
L.reverse()

ct=1
for i in range(b):
  l=[]
  for j in range(L[i]):
    l.append(str(ct))
    ct+=1
  ans.append(' '.join(l))
ans.reverse()

print(' '.join(ans))

N,A,B=map(int,input().split())
if N>A*B or N<A+B-1:
  print(-1)
  return
P=[[] for i in range(B)]
for i in range(N):
  P[i//A].append(i+1)
P=P[::-1]
for i in range(B):
  if len(P[i])==0:
    P[i].append(P[-((N-i-1)//A+1)][-1])
    del P[-((N-i-1)//A+1)][-1]
  else:
    break
Q=[]
for i in range(B):
  for j in range(len(P[i])):
    Q.append(P[i][j])
print(*Q)

N, A, B = map(int, input().split())

if (A + B > N + 1) or (A * B < N):
    print(-1)
    return


distributes = [1] * A
remain = N - A
for i in range(A):
    d = min(remain, B - 1)
    distributes[i] += d
    remain -= d

marker = 1
ans = []
for d in distributes:
    ans.extend(list(range(marker, marker + d))[::-1])
    marker += d
print(*ans, sep=' ')


n, a, b = [int(x) for x in input().split()]
if a * b < n or n < a + b - 1:
    print((-1))
else:
    ans = []
    remaining = n - a
    to_insert = 1
    for i in range(a):
        ans.append(to_insert)
        to_insert += 1
        inserted = 1
        for j in range(min(b - 1, remaining)):
            ans.append(to_insert)
            to_insert += 1
            inserted += 1
            remaining -= 1
        ans[-inserted:] = reversed(ans[-inserted:])
    print((*ans))


# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read

n,a,b = list(map(int,input().split()))

if n < a+b-1 or n > a*b:
    print((-1))
    return

ans = list(range(n,0,-1))
if a == 1:
    print((*ans))
    return
k = (a*b-n)//(a-1)
v = n - k - a*(b-k-1)

#print(a,b,n,k,v)
i = -1
for i in range(b-k-1):
    ans[i*a:(i+1)*a] = ans[i*a:(i+1)*a][::-1]
i += 1
ans[i*a:i*a+v] = ans[i*a:i*a+v][::-1]

print((*ans))


#########################
# 
# ######

N, A, B = [int(_) for _ in input().split()]
if N < A + B - 1 or A * B < N:
    print((-1))
elif B == 1:
    print((*list(range(1, A + 1))))
else:
    M = N - A - B + 1
    count = [B] * (1 + M // (B - 1))
    count += [1] * (A - len(count))
    count[-1] += (N - A - B + 1) % (B - 1)
    f = 0
    ans = []
    for c in count:
        ans += list(range(f + c, f, -1))
        f += c
    print((*ans))


n,a,b=map(int,input().split())
if a+b-1>n:print(-1);return()
if a*b<n:print(-1);return()
ans=[]
c=0
nn=n
for i in range(a):
  ans.append([])
  t=0--nn//(a-i)
  if i==0:
    t=b
  nn-=min(t,b)
  for j in range(min(b,t)):
    ans[-1].append((i+1)*b-j)
    c+=1
    if c==n:break
  if c==n:break
anss=[]
for i in ans:anss+=i
def position_zip(a,flag):
  j=1
  d={}
  for i in sorted(a):
    if i in d:continue
    d[i]=j
    j+=1
  if flag==1:return d
  return [d[i] for i in a]
print(*position_zip(anss,0))

N, A, B = [int(_) for _ in input().split()]
if N < A + B - 1 or A * B < N:
    print((-1))
elif B == 1:
    print((*list(range(1, A + 1))))
else:
    M = N - A - B + 1
    count = [B] * (1 + M // (B - 1))
    count += [1] * (A - len(count))
    count[-1] += (N - A - B + 1) % (B - 1)
    f = 0
    ans = []
    for c in count:
        ans += list(range(f + c, f, -1))
        f += c
    print((*ans))


n, a, b = list(map(int, input().split()))

def solve(n, a, b):
    rev = a < b
    if rev:
        b, a = a, b

    if n < a+b-1:
        return [-1]

    if n > a * b:
        return [-1]

    surrogate_ans = []
    for i in range(b):
        nd = i+1
        reminder = n - a*i
        tail = b - nd
        batch_length = min(a, reminder-tail)
        # print("i: {}, reminder: {}, tail: {}, batch_length: {}".format(i, reminder, tail, batch_length))
        batch = list(range(n+1-a*i-batch_length, n+1-a*i))
        surrogate_ans += batch
        if batch_length != a:
            surrogate_ans += list(reversed(list(range(1, tail+1))))
        if len(surrogate_ans) == n:
            break

    if rev:
        return reversed(surrogate_ans)
    else:
        return surrogate_ans

print((" ".join(map(str, solve(n, a, b)))))



n,a,b = map(int,input().split())
turn = 0
if b > a:
    turn = 1
    a,b = b,a
x = (n+a-1)//a
if x > b or a+b > n+1:
    print(-1)
    return

ans = []
m = n%a
now = n
while x < b:
    ans.append(now)
    now -= 1
    if m:
        m -= 1
        x += 1
    else:
        m = a-1
for i in range((now+a-1)//a):
    for j in range(a-1,-1,-1):
        num = now-i*a-j
        if num > 0:
            ans.append(num)
if turn:
    ans = ans[::-1]
print(*ans)


max2 = lambda x,y: x if x > y else y

def solve(N,A,B):
    if A+B > N+1:
        return None
    if A*B < N:
        return None


    res = [-1]*N
    rem = A

    i = 0
    while i+B+rem-1 < N:
        rem -= 1
        o = i+B
        for k in range(B):
            res[i+k] = o-k-1
        i += B

    p = N-i-rem+1
    for k in range(p):
        res[i+k] = i+p-k-1
    i += p
    rem -= 1
    for k in range(i,N):
        res[k] = k
    return res






from itertools import permutations
def naive(N,A,B):

    for p in permutations(range(N)):
        dp = [1]*N
        for i in range(N):
            for j in range(i):
                if p[j] < p[i]:
                    dp[i] = max2(dp[i],dp[j]+1)

        a = max(dp)

        dp = [1]*N
        for i in range(N):
            for j in range(i):
                if p[j] > p[i]:
                    dp[i] = max2(dp[i],dp[j]+1)

        b = max(dp)

        if a == A and b == B:
            return p
    return None

def __starting_point():
    N,A,B = map(int,input().split())
    res = solve(N,A,B)
    if res is None:
        print(-1)
    else:
        print(*(v+1 for v in res))
__starting_point()

n,a,b = map(int,input().split())
turn = 0
if b > a:
    turn = 1
    a,b = b,a
x = (n+a-1)//a
if x > b or a+b > n+1:
    print(-1)
    return

ans = []
m = n%a
now = n
while x < b:
    ans.append(now)
    now -= 1
    if m:
        m -= 1
        x += 1
    else:
        m = a-1
for i in range((now+a-1)//a):
    for j in range(a-1,-1,-1):
        num = now-i*a-j
        if num > 0:
            ans.append(num)
if turn:
    ans = ans[::-1]
print(*ans)

def distribute(n, person, min, max, mode="even"):
    # n 個を person 人に分配する
    # 返り値は [[a (個), a 個もらう人数], ...]
    if person==0 and n==0:
        return []
    elif not min*person <= n <= max*person:
        return None
    elif mode=="even":
        q, m = divmod(n, person)
        if m==0:
            return [[q, person]]
        else:
            return [[q, person-m], [q+1, m]]
    elif mode=="greedy":
        n -= min * person
        q, m = divmod(n, max-min)
        if m==0:
            return [[min, person-q], [max, q]]
        else:
            return [[min, person-1-q], [min+m, 1], [max, q]]
    else:
        raise ValueError("'mode' must be 'even' or 'greedy'.")

import numpy as np
N, A, B = list(map(int, input().split()))
Ans = np.arange(N, 0, -1, dtype=np.int64)
Ans[:A] = np.flipud(Ans[:A])
c = N-A
D = distribute(c, B-1, min=1, max=A, mode="even")
if D is None:
    print((-1))
    return
idx = A
for p, n in D:
    for _ in range(n):
        Ans[idx:idx+p] = np.flipud(Ans[idx:idx+p])
        idx += p
print((" ".join(str(int(a)) for a in Ans)))


import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n,a,b = map(int, input().split())

def sub(n,a,b):
    ps = list(range(a))
    for i in range(1, b):
        ps.append(-a*i)
    count = a+b-1
    if count==n:
        return ps
    for i in range(1,b):
        for j in range(1,a):
            ps.append(-a*i+j)
            count += 1
            if count==n:
                break
        if count==n:
            break
    return ps

if a+b>n+1:
    ans = -1
elif a*b<n:
    ans = -1
else:
    # a*b個の列
    ps = sub(n,a,b)
    pps = [(i+1,p) for i,p in enumerate(ps)]
    pps.sort(key=lambda x: x[1])
    ans = [item[0] for item in pps]
if ans==-1:
    print(ans)
else:
    write(" ".join(map(str, ans)))

r,p=range,print
n,a,b=map(int,input().split())
if a+b>n+1or a*b<n:print(-1);return
l=[[]for i in r(b-1)]+[list(r(1,a+1))]
for i in r(a+1,n+1):l[-2-(i-a-1)%(b-1)]+=[i]
for i in l:p(*i,end=" ")

import sys
input = sys.stdin.readline
from collections import defaultdict
mod = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

def main():
	N, A, B = getlist()
	if 1 + N < A + B or N > A * B:
		print(-1)
		return

	ans = [i for i in range(N, N - B, -1)]
	N2 = N - B; A2 = A - 1
	if A2 == 0:
		print(*ans)
		return
	p = N2 // A2
	q = N2 % A2
	B = [p] * A2
	B.append(0)
	for i in range(q):
		B[i] += 1
	# print(B)
	Bsum = [0] * A2
	for i in range(A2):
		Bsum[i] = Bsum[i - 1] + B[i]
	# print(Bsum)

	pre = []
	for i in range(A2):
		for j in range(B[i]):
			pre.append(Bsum[i] - j)
	# print(pre)
	answer = pre + ans
	print(*answer)




def __starting_point():
	main()
__starting_point()

import sys
input = sys.stdin.readline
N, A, B = map(int, input().split())
if N < A or N < B:
  print(-1)
  return
res = [x for x in range(N - A + 1, N + 1)]
k = N - A
if k < B - 1:
  print(-1)
  return
b = [0] * (B - 1)
for i in range(k):
  b[i % (B - 1)] += 1
if len(b):
  if max(b) > A:
    print(-1)
    return
for i in b:
  t = [x for x in range(k - i + 1, k + 1)]
  res += t
  k -= i
print(*res)

N, A, B = map(int, input().split())

if A * B < N:
  print(-1)
elif A + B - 1 > N:
  print(-1)
else:
  P = [0] * N
  b = (N - A) // (B - 1) if B > 1 else 0
  r = (N - A) % (B - 1) + 1 if B > 1 else 1
  i = 1
  pos = 0
  while i <= N:
    if b:
      for j in range(B):
        P[pos + B - j - 1] = i
        i += 1
      pos += B
      b -= 1
    elif r:
      for j in range(r):
        P[pos + r - j - 1] = i
        i += 1
      pos += r
      r = 0
    else:
      P[pos] = i
      i += 1
      pos += 1
    
  for p in P:
    print(p, end=' ')

N, A, B = list(map(int, input().split()))

if A + B - 1 > N or A * B < N:
    print('-1')
else:
    ans = list(range(1, B + 1)[::-1])
    if A > 1:
        x = (N - B) // (A - 1)
        y = (N - B) % (A - 1)
        st = B + 1
        for i in range(y):
            ans += list(range(st, st + x + 1)[::-1])
            st += x + 1
        for i in range(A - 1 - y):
            ans += list(range(st, st + x)[::-1])
            st += x

    print((' '.join(map(str, ans))))


N, A, B = list(map(int, input().split()))


def f(a, b):
    return [
        p
        for p in [
            N - i * a + j
            for i in range(
                1,
                N // a + 1 if N % a > b - N // a else
                N // a
            )
            for j in range(1, a + 1)
        ] +
        [
            j
            for j in range(
                b - N // a if N % a > b - N // a else
                b - N // a + 1,
                N - (N // a) * a + 1 if N % a > b - N // a else
                N - (N // a - 1) * a + 1
            )
        ] +
        [
            j
            for j in reversed(
                list(range(
                    1,
                    b - N // a if N % a > b - N // a else
                    b - N // a + 1))
            )
        ]
    ]


# N - A + 1, N - A + 2, ..., N,
# N - 2A + 1, N - 2A + 2, ..., N - A,
# ...,
# N - floor(N / A)A + 1, N - floor(N / A)A + 2, ..., N - (floor(N / A) + 1)A,
# B - floor(N / A), B - floor(N / A) + 1, ..., N - floor(N / A)A
# B - floor(N / A) - 1, B - floor(N / A) - 2, ..., 1
# と構築する
ans = (
    -1 if A * B < N or A + B > N + 1 else
    ' '.join(
        str(p) if A >= B else
        str(N - p + 1)
        for p in f(max(A, B), min(A, B))
    )
)

print(ans)


N,A,B = map(int,input().split())
if A+B-1>N or N>A*B:
    print(-1)
else:
    G = {i:[] for i in range(1,A+1)}
    i = A
    cnt = 0
    cur = N
    while cur>A:
        G[i].append(cur)
        cnt += 1
        cur -= 1
        if cnt==B-1:
            cnt = 0
            i -= 1
    C = []
    for i in range(1,A+1):
        C += G[i]
        C.append(i)
    print(*C)

# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys
def main(N, A, B):
    if A + B - 1 > N or A * B < N:
        print((-1))
        return
    P = []
    r = A * B - N
    for b in range(B):
        for a in range(A):
            if b >= 1 and a >= 1 and r > 0:
                if r >= A - 1:
                    r -= A - 1
                    break
                r -= 1
                continue
            P.append((B - b) * A + a + 1)
    s = sorted([(p, i) for i, p in enumerate(P)], key=lambda x: x[0])
    s = sorted([(i, j) for j, (p, i) in enumerate(s)], key=lambda x: x[0])
    s = [j + 1 for i, j in s]
    print((*s))

def __starting_point():
    input = sys.stdin.readline
    N, A, B = list(map(int, input().split()))
    main(N, A, B)

__starting_point()

import sys
input = sys.stdin.readline

"""
n-増大列、m-減少列まで　-> 長さ nm 以下であることを示す。帰納法。
(n+1)m + 1 項があるとする。(n+2増大 or m+1減少)の存在をいう。
A：左 nm 項 B：右 m+1 項
Aに1項加えると、(n+1,m+1)のどちらかができる。(n+1)-増大ができるとしてよい。
Bの各項 b に対して、bで終わる(n+1)-増大列が存在する。
Bの中に2-増大列があれば(n+2)増大列ができる。そうでなければBが(m+1)-減少列なのでよい

"""

N,A,B = map(int,input().split())

if A+B-1 > N:
    print(-1)
    return
if A*B < N:
    print(-1)
    return

# 減少列をA個並べる

if B == 1:
    size = [1] * A
else:
    q,r = divmod(N-A,B-1)
    if q < A:
        size = [B] * q + [1+r] + [1] * (A-q-1)
    else:
        size = [B] * A

answer = []
start = 1
for s in size:
    end = start + s
    answer += list(range(end-1, start-1, -1))
    start = end
print(*answer)

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n,a,b = LI()
    if a+b > n+1:
        return -1
    t = n // b
    if n % b > 0:
        t += 1
    if a < t:
        return -1
    rr = []
    while n > 0:
        if n == a:
            rr.append(list(range(1,n+1)))
            break
        if n-b >= a-1:
            rr.append(list(range(n,n-b,-1)))
            n -= b
            a -= 1
            continue
        rr.append(list(range(n,a-1,-1)))
        rr.append(list(range(1,a)))
        break
    r = []
    rr.reverse()
    for c in rr:
        r.append(' '.join(map(str,c)))

    return ' '.join(r)


print(main())




def main(n,a,b):
    if not a*b>=n>=a+b-1:
        return [-1]
    ans=[]
    flg=False
    # ブロック数
    for x in range(b): 
        # x番目のブロック(0-indexed)
        if not flg:
            for y in range(a):
                # x*a+y+1個目の要素(1-indexed)
                ans.append(b-x+b*y)
                if len(ans)+(b-x)==n:
                    if y!=a-1:
                        ans.append(b-x+b*(a-1))
                    else:
                        ans.append(b-(x+1))
                    flg=True
                    break
        elif flg:
            ans.append(b-x+b*(a-1))
    c=ans.copy()
    c.sort()
    from bisect import bisect_right
    ans=[bisect_right(c,x) for x in ans]
    return ans

n,a,b=map(int,input().split())
ary=main(n,a,b)
print(*ary,sep=' ')


import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, A, B = mapint()
from collections import deque
if A+B-1>N or N>A*B:
    print(-1)
else:
    blocks = []
    blocks.append(' '.join(map(str, range(B, 0, -1))))
    now = B+1
    rest = N-A+2

    while now:
        if now==rest:
            break
        if now+B>rest:
            blocks.append(' '.join(map(str, range(rest, now-1, -1))))
            rest += 1
            break
        blocks.append(' '.join(map(str, range(now+B-1, now-1, -1))))
        now = now+B
        rest += 1
    blocks.append(' '.join(map(str, range(rest, N+1))))
    print(' '.join(blocks))

import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return list(map(int, input().split()))
def LI(): return list(map(int, input().split()))

"""
和はN+1以下である．
A列とB列の両方で共通して持てるのは1個までなので．
下限はどれくらいだろう．

A=1 or B=1なら相方はN確定．
基本的にAもBも1ではない前提で話す

とりあえず構築を考えるか．
A+B=N+1なら簡単．
B,B-1,...,2,1,B+1,B+2,...N
で良い．手前にB列，奥にA列を固める．

A+B=N-1でない場合，A列に使うものとB列に使うものはかぶらなくて良い．
手前に大きい順にB個だけ並べておけば，
N-B個の順列で
LIS=Aかつ
LDS≠B
を満たせるか，という問題に帰着．
うーん，

このやり方でN=20，A=2,B=5にできる?無理，1からみてLISを3にならないようにするには降順に並べるしかない
いくつかのグループに分けようか．
17~20, 13~16, 9~12, 5~8, 1~4
のグループに分けて，グループ内では昇順にすれば
A=4,B=5まではいける．B=5を固定したらこれがAの最小な気がする
Aの最小値はN/Bの切り上げ，かな
"""
def main():
    mod=10**9+7
    N,A,B=MI()
    
    if A+B>N+1:
        print((-1))
        return
        
    t=(N+B-1)//B
    if A<t:
        print((-1))
        return
        
    if A==1:
        if B==N:
            ans=list(range(N,0,-1))
            print((' '.join(map(str, ans))))
            return
        else:
            print((-1))
            return
    
    if B==1:
        if A==N:
            ans=list(range(1,N+1))
            print((' '.join(map(str, ans))))
            return
        else:
            print((-1))
            return
    
        
    ans=[]
    temp=list(range(N-A+1,N+1))
    ans+=temp
    unit=(N-A)//(B-1)
    rem=(N-A)%(B-1)
    
    right=N-A #各グループの右端
    for i in range(B-1):
        left=right-unit
        if rem:
            left-=1
            rem-=1
        temp=list(range(left+1,right+1,1))
        ans+=temp
        right=left
        
    print((' '.join(map(str, ans))))
        
        
        

main()


N, A, B = list(map(int, input().split()))
def solve():
    if A + B - 1 <= N and N <= A * B:
        if A == 1:
            return [i for i in range(N, 0, -1)]
        s = []
        q = (N - B) // (A - 1)
        r = (N - B) % (A - 1)
        if r == 0:
            q -= 1
            r = A - 1
        for i in range(B - q - 1):
            s.append(N - i)
        for i in range(r + 1):
            s.append(A * q + 1 + i)
        for i in range(q - 1, -1, -1):
            for j in range(A):
                s.append(A * i + j + 1)
        return s
    else:
        return [-1]
print((" ".join(map(str, solve()))))


N, A, B = map(int, input().split())
if A+B>N+1: print(-1);return
res,tmp=[],[]
k,l,cnt,sign,m1,m2 = N+1,0,0,1,0,0
while k!=l+1:
    if m1>=A or m2>=B:print(-1);return
    if sign==1:
        if cnt<A-m1:
            k-=1
            tmp.append(k)
            cnt+=1
        else:
            res.extend(reversed(tmp))
            tmp=[]
            cnt=0
            sign=0
            m2+=1
    else:
        if cnt<B-m2:
            l+=1
            tmp.append(l)
            cnt+=1
        else:
            res.extend(reversed(tmp))
            tmp=[]
            cnt=0
            sign=1
            m1+=1
res.extend(reversed(tmp))
print(*res)

N,A,B = list(map(int,input().split()))
ans = []
if N >= A + B - 1 and N <= A *B:
    for i in range(A):
        ans.append(str(N - A +1 + i))
        for j in range(B-1):
            if i * (B -1 ) + (B -1 -j) > N - A + B:
              break
            elif i * (B-1) + (B -1 - j ) >= N - A + 1:
                continue
            #print(i * (B-1) + (B-1 -j))
            ans.append(str(i * (B-1) + (B-1 - j )))
else:
    ans = ["-1"] 
print(" ".join(ans))

import sys
def MI(): return list(map(int,sys.stdin.readline().rstrip().split()))


N,A,B = MI()

if not (A+B <= N+1 and A*B >= N):
    print((-1))
    return

ANS = [[i for i in range(1,A+1)]]
if B >= 2:
    a = A+1
    q,r = divmod(N-A,B-1)
    for i in range(B-1-r):
        ANS.append([i for i in range(a,a+q)])
        a += q
    for i in range(r):
        ANS.append([i for i in range(a,a+q+1)])
        a += q+1

ANS.reverse()
ans = []
for X in ANS:
    for i in range(len(X)):
        ans.append(X[i])

print((*ans))


def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from decimal import *
from heapq import heapify, heappop, heappush
import math
import random
import string
from copy import deepcopy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

#############
# Main Code #
#############

"""
最長増加部分列の長さはA　
最長減少部分列の長さはB
使える数字は1 ~ N
一番都合のいいものを探す
A + B > N + 1ならダメっぽい
A + B = Nの場合
2 3 5 + 5 4
2 3 1 5 4
1を適当な所に置けば良い
A + B = N + 1の場合は簡単
N = 5
A, B = 3, 3
3 4 5 + 5 2 1
3 4 5 2 1

A + B < N の場合
いらないものを適当に置けば
いいのでは？
N = 5
A, B = 2, 2 は無理 A + B <= 4は無理
2 3 + 3 1 (4, 5はいらない)
2 3 1 + 4 5

(5, 6, 3, 1, 4, 2)
4 5 6 1 2 3

def lis(A):
    L = [A[0]]
    for a in A[1:]:
        if a > L[-1]:
            L.append(a)
        # このelseに引っかかった時にトランプのソートが必要
        else:
            L[bisect_left(L, a)] = a
    return len(L)

for i in permutations([1, 2, 3, 4, 5, 6, 7]):
    if lis(i) + lis(list(reversed(i))) <= 5:
        print(lis(i), lis(list(reversed(i))), i)

相方を2にした場合の下限は(N + 1) // 2 ?
5なら3 2
6なら3 2
7なら4 2
8なら4 2
3 4 5 + 5 2
3 4 5 1 2
4 5 6 + 6 3
4 5 6 1 2 3
4 5 6 7 + 6 3
4 5 6 7 1 2 3
細かく区切ればもっといける
N = 16なら
[13 14 15 16] [9 10 11 12] [5 6 7 8] [1 2 3 4]
A = 4, B = 4
A * B >= Nであれば作れる
"""

N, A, B = getNM()

# mainの長さが半分より下ならout
if A * B < N or N + 1 < A + B:
    print(-1)
    return

if A == 1:
    if B == N:
        print(*[i for i in range(N, 0, -1)])
    else:
        print(-1)
    return

if B == 1:
    if A == N:
        print(*[i for i in range(1, N + 1)])
    else:
        print(-1)
    return

# グループ内の要素の数がA,グループの数がB
res1 = [i + 1 for i in range(N - A, N)]
res2 = []
L = [i + 1 for i in range(N - A - 1, -1, -1)] # 残りN - A個

# 残りN - A個をB - 1個で分割する
ind = (N - A) // (B - 1)
for i in range(B - 1):
    opt = []
    for j in range(ind + (i < (N - A) % (B - 1))):
        u = L.pop()
        opt.append(u)
    res2.append(opt)

res2 = list(reversed(res2))

ans = res1
for i in range(B - 1):
    ans += res2[i]

def lis(A):
    L = [A[0]]
    for a in A[1:]:
        if a > L[-1]:
            L.append(a)
        # このelseに引っかかった時にトランプのソートが必要
        else:
            L[bisect_left(L, a)] = a
    return len(L)

# print(lis(ans), lis(list(reversed(ans))))
print(*ans)

import numpy as np
N,A,B = list(map(int,input().split()))

if A+B > N+1:
  print("-1")
  return
if A == 1:
  if B== N:
    ans = [i+1 for i in reversed(list(range(N)))]
    print((*ans))
    return
  else:
    print("-1")
    return
if B == 1:
  if A== N:
    ans = [i+1 for i in range(N)]
    print((*ans))
    return
  else:
    print("-1")
    return
if A >= B:
  Flag = True
else:
  Flag = False
  A,B = B,A
#print((N+A-1)//A, B)
if A*B<N:
  print("-1")
  return
else:
  L = [1 for _ in range(B)]
  nokori = N-B
  for i in range(B):
    if A-L[i] >0:
      temp = min(A-L[i],nokori)
      L[i] += temp
      nokori -= temp
    if nokori == 0:
      break
  now = 0
  P = [[] for _ in range(B)]
  for i,num in enumerate(L):
    for j in range(num):
      now += 1
      P[-i-1].append(now)
  #print(P)
  ans = P
  output = []
  for i in range(len(ans)):
    for j in ans[i]:
      output.append(j)
  if Flag:
    print((*output))
  else:
    output = output[::-1]
    print((*output))


n,a,b=map(int,input().split())
ans=[];L=[a]*b;x=a*b-n;ct=1
for i in range(b-1,0,-1):
  y=min(a-1,x);L[i]-=y;x-=y
for i in range(b):
  l=[]
  for j in range(L[i]):
    l.append(str(ct))
    ct+=1
  ans.append(' '.join(l))
ans.reverse()
print(-1 if a+b>n+1 or a*b<n else ' '.join(ans))

import math

n, a, b = map(int, input().split())
f = 1
ans = [0] * n
if max(a, b) > n:
    f = 0
elif not math.ceil((n - a) / a) + 1 <= b <= n - a + 1:
    f = 0
if f:
    ans[-a] = 1
    if not b == 1:
        c, d = (n - a) // (b - 1), b - 1 - (n - a) % (b - 1)
        now = n + 1
        i = 0
        for j in range(b - 1):
            now -= c
            if j >= d:
                now -= 1
            ans[i] = now
            i += c
            if j >= d:
                i += 1
    for i in range(1, n):
        if ans[i] == 0:
            ans[i] = ans[i - 1] + 1
print(" ".join(map(str, ans)) if f else -1)

N,A,B=map(int,input().split())
a=list(range(N-A+1,N+1))
for i in range(B-1,0,-1):
    a.append(i)
m,M=B,N-A
for j in range(A-1):
    for i in range(min(M,m+B-2),m-1,-1):
        a.append(i)
    m=min(M,m+B-2)+1
    if len(a)==N:
        break
print(*a if len(a)==N else [-1])

def main():
    N, A, B = list(map(int, input().split()))
    if N < A:
        print((-1))
        return
    x = -(-N//A)
    if B < x or (N-A+1) < B:
        print((-1))
        return
    lst = list(range(1, N+1))
    seq = [lst[:A]]
    idx = A
    for i in range(B-1):
        rem = B-1-i
        nidx = idx - (-(N-idx)//rem)
        seq.append(lst[idx:nidx])
        idx = nidx
    ans = []
    for s in reversed(seq):
        ans += s
    print((*ans))


def __starting_point():
    main()

__starting_point()

#from collections import deque,defaultdict
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7
#R = 998244353

def ddprint(x):
  if DBG:
    print(x)

n,a,b = inm()
flip = False
if a<b:
    a,b = b,a
    flip = True
if a*a<n or n<a or a+b-1>n or a*b<n:
    print(-1)
    return
d = [0]*(a+1)
m = n
for i in range(1,a+1):
    d[i] = min(b,m-(a-i))
    m -= d[i]
t = []
x = 1
for z in d[1:]:
    y = list(range(x,x+z))
    x += z
    y.reverse()
    t.extend(y)
if flip:
    t.reverse()
print(' '.join([str(x) for x in t]))


n,a,b = map(int, input().split())
if a*b < n:
    print(-1)
elif a+b-1 > n:
    print(-1)
else:
    if a*b == n:
        l = [b] * a
    else:
        l = [b] * ((n-a) // (b-1)) + [(n-a) % (b-1) + 1] + [1] * (a - 1 - (n-a) // (b-1))
    j = 0
    c = 0
    ans = [0] * n
    for i in l:
        c += i
        for k in range(c, c-i, -1):
            ans[j] = k
            j += 1
    print(" ".join(map(str, ans)))

#!/usr/bin/env python3


def make_result(n, a, b):
    result = []
    tail = []
    if n < a * b:
        if a <= b:
            k = (a * b - n + b - 2)//(b - 1) - 1
            tail = [n - i for i in range(k - 1, -1, -1)]
            n -= k
            a -= k
            k = n - (a - 1) * b
            tail = [n - i for i in range(k)] + tail
            n -= k
            a -= 1
        else:
            k = (a * b - n + a - 2)//(a - 1) - 1
            result = [n - i for i in range(k)]
            n -= k
            b -= k
            k = n - a * (b - 1)
            result += [n - i for i in range(k - 1, -1, -1)]
            n -= k
            b -= 1

    for i in range(b):
        for j in range(a):
            result.append(n - a * (i + 1) + j + 1)

    return result + tail


def solve(n, a, b):
    if n < a + b - 1:
        return '-1'
    if a * b < n:
        return '-1'

    return ' '.join(map(str, make_result(n, a, b)))


def main():
    n, a, b = input().split()
    n = int(n)
    a = int(a)
    b = int(b)

    print((solve(n, a, b)))


def __starting_point():
    main()


__starting_point()

def main():
    n, a, b = list(map(int, input().split()))
    if b < (n-1)//a+1 or n-a+1 < b:
        print((-1))
        return 0
    for i in range((n-1)//a+1, n-a+2):
        cnt_a = (i-(n-1)//a)
        cnt_b = b-cnt_a-1
        length = n-cnt_a*a-cnt_b
        if length <= a:
            break
    j = n+1
    ans = []
    for i in range(cnt_a):
        j -= a
        ans += list(range(j, j+a))
    if cnt_b >= 0:
        j -= length
        ans += list(range(j, j+length))+list(range(j-1, 0, -1))
    print((*ans))


main()


n,a,b = map(int,input().split())
if not (a+b-1 <= n <= a*b):
  print(-1)
  return
n -= a
l = list()
for i in range(b,a*b+1,b):
  t = min(n,b-1)
  l += [i-j for j in range(t+1)]
  n -= t
d = dict()
g = sorted(l)
for i,x in enumerate(g,1):
  d[x] = i
l = list(map(lambda x:d[x], l))
print(*l)

n,a,b=map(int,input().split())
ans=[];L=[a]*b;x=a*b-n;ct=1
if a+b>n+1 or x<0:print(-1);return
for i in range(b-1):
 y=min(a-1,x);L[i]-=y;x-=y
for i in L:
 l=[]
 for j in range(i):
  l+=[str(ct)];ct+=1
 ans+=[' '.join(l)]
print(*reversed(ans))

import sys
input = sys.stdin.readline

N, A, B = map(int, input().split())
if A + B - 1 > N:
    print(-1)
    return

a = []
b = []
while N > 0:
    if A == 0 or B == 0:
        print(-1)
        return
    if B >= N:
        b = list(range(N, 0, -1)) + b
        N = 0
    else:
        b = list(range(N, N-B, -1)) + b
        N -= B
        if A - 1 >= N:
            a += list(range(1, N+1))
            N = 0
        else:
            a += list(range(N-A+2, N+1))
            N -= A - 1
    A -= 1
    B -= 1
ans = a + b
print(*ans)

N, A, B = map(int, input().split())

ans = list(range(A))
m = 0
rest = N - A
B -= 1
if rest < B:
  print(-1)
  return
if rest / A > B:
  print(-1)
  return

while rest > B:
  s = min(A, rest - B + 1)
  ans += list(range(m - s, m))
  m -= s
  rest -= s
  B -= 1

ans += list(range(m - B, m))[::-1]
m -= B

print(" ".join([str(x - m + 1) for x in ans]))

n,a,b=map(int,input().split())
if not a+b-1<=n<=a*b:
  print(-1)
  return
n-=a
l=list()
for i in range(b,a*b+1,b):
  t=min(n,b-1)
  l+=[i-j for j in range(t+1)]
  n-=t
d=dict()
g=sorted(l)
for i,x in enumerate(g,1):
  d[x]=i
l=list(map(lambda x:d[x],l))
print(*l)

n, a, b = map(int, input().split())
if a+b-1 > n or a*b < n:
  print(-1)
  return
L = [[] for _ in range(b)]
L[-1] = list(range(1, a+1))
for now in range(a+1, n+1):
  temp = -2 - (now-(a+1))%(b-1)
  L[temp].append(now)
for l in L:
  print(*l, end=" ")

from math import ceil
N,A,B=map(int,input().split())
if N+1<A+B or A*B<N:
  print(-1)
  return

t=N//B
s=[]
while N>0:
  if N==A:
    s.append(list(range(1,N+1)))
    break
  if N-B>=A-1:
    s.append(list(range(N,N-B,-1)))
    N-=B
    A-=1
    continue  
  s.append(list(range(N,A-1,-1)))
  s.append(list(range(1,A)))
  break
ans=[]
s.reverse()
for a in s:
  ans.append(' '.join(map(str,a)))
 
print(' '.join(ans))

import sys
import collections
import itertools

sys.setrecursionlimit(10 ** 8)
inm = lambda: list(map(int, sys.stdin.readline().split()))
# debug = lambda *a, **kw: print(*a, **kw, file=sys.stderr)

N, A, B = inm()


def solve():
    if A + B > N + 1:
        return None
    a, b = N, 1
    b += B - 1
    a -= B - 1
    # a=N-B+1, b=B

    s = []
    s.append(list(range(B, 0, -1)))
    la = 1
    p = B + 1  # 1-indexed
    ra = N - p + 1
    # debug(f"{p=} {la=} {ra=} {la+ra=}")
    while la + ra > A:
        p2 = p + min(B, la + ra - A + 1)
        s.append(list(range(p2 - 1, p - 1, -1)))
        p = p2
        la += 1
        ra = N + 1 - p
        # debug(f"{p=} {la=} {ra=} {la+ra=}")
        if la == A and ra > 0:
            return None
    assert la + ra == A
    s.append(list(range(p, N + 1)))
    return list(itertools.chain.from_iterable(s))


ans = solve()
if ans is None:
    print((-1))
else:
    print((*ans))


import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, A, B = mapint()
from collections import deque
if A+B-1>N or N>A*B:
    print(-1)
else:
    blocks = []
    blocks.append(' '.join(map(str, range(B, 0, -1))))
    now = B+1
    rest = N-A+2

    while now:
        if now>=rest:
            break
        if now+B>rest:
            blocks.append(' '.join(map(str, range(rest, now-1, -1))))
            rest += 1
            break
        blocks.append(' '.join(map(str, range(now+B-1, now-1, -1))))
        now = now+B
        rest += 1
    blocks.append(' '.join(map(str, range(rest, N+1))))
    print(' '.join(blocks))

import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
int1 = lambda x: int(x) - 1

def main():
    n, a, b = list(map(int, input().split()))
    if not (n + a - 1) // a <= b <= n - a + 1:
        print((-1))
        return
    ans = []
    ans.append(list(range(1, a + 1)))
    # print(ans)
    b -= 1
    st = a + 1
    while b:
        if b == 1:
            ans.append(list(range(st, n + 1)))
            break
        elif n - st + 1 - a >= b - 1:
            ans.append(list(range(st, st + a)))
            st += a
            b -= 1
        else:
            ans.append([st])
            st += 1
            b -= 1
    x = []
    for ak in ans[::-1]:
        x += ak
    print((*x))

main()


N, A, B = list(map(int, input().split()))

base = list(range(N, 0, -1))
if A < B:
    tmp = A
    A = B
    B = tmp
    base.reverse()

if (N - 1) // B + 1 <= A <= N - B + 1:
    possible = 1
else:
    possible = 0

if possible:
    split = [A]
    N_left = N - A
    for i in range(B-1, 0, -1):
        split.append((N_left - 1) // i + 1 + split[-1])
        N_left -= (N_left - 1) // i + 1

    split.insert(0, 0)
    ans = []
    for i in range(1, len(split)):
        rev = base[split[i-1]:split[i]]
        rev.reverse()
        ans.extend(rev)
    print((" ".join(map(str, ans))))
else:
    print((-1))


n,a,b = map(int,input().split())
if a+b>n+1 or a*b<n:
  print(-1)
  return
ans = []
for i in range(1,a+1):
  ans.append(i*b)
if b == 1:
  x = list(range(1,n+1))
  print(*x)
  return
x = (n-a)//(b-1)
y = (n-a)%(b-1)
for i in range(1,b):
  for j in range(1,x+1):
    ans.append(j*b-i)
  if i <= y:
    ans.append((x+1)*b-i)
ans_true = []
for i,x in enumerate(ans):
  ans_true.append((i+1,x))
ans_true.sort(key=lambda x:x[1])
x = list(zip(*ans_true))[0]
print(*x)

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def lis(A):
    N = len(A)
    LIS = []

    for i in range(N):
        index = bisect_left(LIS, A[i])
        if index >= len(LIS):
            LIS.append(A[i])
        else:
            LIS[index] = A[i]

    return len(LIS)


def func(A):
    return lis(A), lis([-1 * a for a in A])


def solve(N, A, B):
    ans = []
    now = 1
    num = 0
    while now <= N:
        for i in range(min(N, now + B - 1), now - 1, -1):
            ans.append(i)
        now += B
        num += 1
        rest = N - now + 1
        if 1 + rest - B < A - num:
            break

    for _ in range(A - num - 1):
        ans.append(now)
        now += 1
        num += 1
        if now == N:
            break

    use = False
    for i in range(N, now - 1, -1):
        ans.append(i)
        use = True

    if num + use != A:
        return [-1]

    return ans


def check(N, A, B):
    for p in permutations(list(range(1, N + 1))):
        if (A, B) == func(list(p)):
            return list(p)
    return [-1]


def main():
    N, A, B = list(map(int, input().split()))
    ans = solve(N, A, B)
    print((*ans))


def __starting_point():
    main()

__starting_point()

n,a,b = map(int, input().split())
if a+b > n+1 or a*b < n:
    print(-1)
    return

l = []
used = 0
for i in range(a):
    tmp = []
    for j in range(b):
        tmp.append(used+1)
        used += 1
        if n-used == a-i-1:
            break
    l.extend(tmp[::-1])
print(*l)

n, a, b = map(int, input().split())

min_b = -((-n) // a)
if not(min_b <= b and a + b <= n + 1):
    print(-1)
    return

ans = []
i = 0
while True:
    tmp = []
    break_flag = False
    for j in range(a):
        if i * a + j >= n:
            break_flag = True
            break
        tmp.append(i * a + j + 1)
    if not tmp:
        break
    ans.append(tmp)
    i += 1
    if break_flag:
        break

ans.sort(reverse=True)
nokori_b = b - len(ans)

for i in range(len(ans) - 1):
    cnt_elems = len(ans[i])
    if nokori_b >= len(ans[i]) - 1:
        ans[i].sort(reverse=True)
        nokori_b -= (len(ans[i]) - 1)
    else:
        ans[i] = sorted(ans[i][:nokori_b + 1], reverse=True) + ans[i][nokori_b + 1:]
        break

res = []
for li in ans:
    for num in li:
        res.append(num)
print(*res)

r,p=range,print
n,a,b=map(int,input().split())
if a+b>n+1or a*b<n:print(-1);return
l=[[]for i in r(b-1)]+[list(r(1,a+1))]
for i in r(a,n):l[-2-(i-a)%(b-1)]+=[i+1]
for i in l:p(*i,end=" ")

N, A, B = map(int, input().split())

if N-B+1 < A or A < (N + B-1) // B:
    print(-1)
    return

res = []
r = []
cnt = 0
for i in range(N):
    r.append(N-i)
    if N-i <= A-cnt or len(r) == B:
        res.append(r)
        r = []
        cnt += 1

if r:
    res.append(r)
ans = []
for r in reversed(res):
    ans.extend(r)
print(*ans)

N,A,B=map(int,input().split())
if A+B-1>N or A*B<N:
  print(-1)
  return
Q=[[] for i in range(B)]
for i in range(N):
  Q[i//A].append(i+1)
Q=Q[::-1]
X=N-1
for i in range(B):
  if len(Q[i])==0:
    Q[i].append(Q[-(X//A+1)][-1])
    del Q[-(X//A+1)][-1]
    X-=1
  else:
    break
P=[]
for i in range(B):
  for j in range(len(Q[i])):
    P.append(Q[i][j])
print(*P)

#!/usr/bin/env python3

def solve(n, a, b):
    if a + b - 1 > n:
        return [ -1 ]
    if a * b < n:
        return [ -1 ]

    # construct in \omega^2
    xs = []
    xs += [ (0, - j) for j in range(b) ]
    for i in range(1, a):
        xs += [ (i, 0) ]
        j = 1
        while j < b and len(xs) + (a - i - 1) < n:
            xs += [ (i, - j) ]
            j += 1

    # coordinate compression
    f = {}
    for x in sorted(xs):
        k = len(f)
        f[x] = k
    return [ f[x] + 1 for x in xs ]


print((*solve(*list(map(int, input().split())))))



import sys
from bisect import bisect

def Longest_Increasing_Subsequence(N,lst):
    #配列の長さがN、配列がlstで与えられる最長増加部分列を返す
    #O(NlogN)
    
    MM=max(lst)+1
    data=[MM]*(N+1)
    #MMは配列の最大値とする
    #infだと計算量が結構大きくなるため
    
    data[0]=0
    for i in range(N):
        b=bisect(data,lst[i])
        data[b]=lst[i]

    ANS=1
    for i in range(1,N+1):
        if data[i]!=MM:
            ANS=i
    
    return ANS

def Longest_Decreasing_Subsequence(N,lst):
    #配列の長さがN、配列がlstで与えられる最長減少部分列を返す
    #O(NlogN)
    
    MM=max(lst)+1
    data=[MM]*(N+1)
    #MMは配列の最大値とする
    
    #配列を逆にして、最長増加部分列を求めればいよい
    lst=lst[::-1]
    
    data[0]=0
    for i in range(N):
        b=bisect(data,lst[i])
        data[b]=lst[i]

    ANS=1
    for i in range(1,N+1):
        if data[i]!=MM:
            ANS=i
    
    return ANS



N,A,B=map(int,input().split())
AAA,BBB=A,B

if A>N or B>N:
    print(-1)
    return
if B>N-A+1:
    print(-1)
    return

ans=[]
L=1
R=N
flag=[0]*(N+1)
flag[0]=1

if A<B:
    B-=1
    while A>0 and B>0 and len(ans)<N:
        for i in range(max(1,R-A+1),R+1):
            if flag[i]==0:
                flag[i]=1
                ans.append(i)
        R-=A
        A-=1
        for i in range(min(N,L+B-1),L-1,-1):
            if flag[i]==0:
                flag[i]=1
                ans.append(i)
        L+=B
        B-=1
        
    for i in range(min(N,L+B-1),L-1,-1):
        if flag[i]==0:
            flag[i]=1
            ans.append(i)

elif A==B:
    B-=1
    while A>0 and B>0 and len(ans)<N:
        for i in range(max(1,R-A+1),R+1):
            if flag[i]==0:
                flag[i]=1
                ans.append(i)
        R-=A
        A-=1
        for i in range(min(N,L+B-1),L-1,-1):
            if flag[i]==0:
                flag[i]=1
                ans.append(i)
        L+=B
        B-=1
        
    for i in range(max(1,R-A+1),R+1):
        if flag[i]==0:
            flag[i]=1
            ans.append(i)

else:
    A-=1
    while A>0 and B>0 and len(ans)<N:
        for i in range(min(N,L+B-1),L-1,-1):
            if flag[i]==0:
                flag[i]=1
                ans.append(i)
        L+=B
        B-=1
        for i in range(max(1,R-A+1),R+1):
            if flag[i]==0:
                flag[i]=1
                ans.append(i)
        R-=A
        A-=1
    
    for i in range(max(1,R-A+1),R+1):
        if flag[i]==0:
            flag[i]=1
            ans.append(i)

if len(ans)>=N:
    ans=ans[:N]
    if  Longest_Increasing_Subsequence(N,ans)==AAA and Longest_Decreasing_Subsequence(N,ans)==BBB:
        print(*ans)
    else:
        print(-1)
else:
    print(-1)

r,p=range,print
n,a,b=map(int,input().split())
if a+b>n+1or a*b<n:print(-1);return
l=[[]for i in r(b-1)]+[list(r(1,a+1))]
for i in r(a+1,n+1):l[-2-(i-a-1)%(b-1)].append(i)
for i in l:p(*i,end=" ")

import sys
def inpl(): return [int(i) for i in input().split()]
N, A, B = inpl()
rev = (A < B)
B ,A = sorted([B, A])
if B < -(-N//A) or A+B-1 > N:
    print(-1)
    return
st = list(range(1,N+1))
if B == 1:
    ans = st
elif 2*A > N:
    ans = st[A:N-B+1] + st[N-1:N-B:-1] + st[0:A]
else:
    n = N//A
    x = B+(-N//A)+1
    ans = st[n*A:N] + st[(n-1)*A:n*A-x] + st[n*A-1:n*A-x-1:-1]
    for i in range(2,n+1):
        ans += st[(n-i)*A:(n-i+1)*A]
if rev:
    ans = [N+1-i for i in ans]
print(*ans)

n, a, b = map(int, input().split())
if a+b-1 > n or a*b < n:
	print(-1)
elif b == 1:
	print(*list(range(1, n+1)))
else:
	ans = list(range(n-a+1, n+1))
	num = b-1
	mod = n-a - (n-a)//(b-1) * (b-1)
	size1 = (n-a)//(b-1)
	size2 = size1 + 1
	mi = n-a
	for i in range(num):
		if i < num-mod:
			ans += list(range(mi - size1 + 1, mi + 1))
			mi = mi - size1
		else:
			ans += list(range(mi - size2 + 1, mi + 1))
			mi = mi - size2
	print(*ans)

N, A, B = map(int, input().split())
if A * B < N or A + B > N + 1:
    print(-1)
    return
X = [[i * B] for i in range(A)]
s = N - A
i = 0
while s:
    if len(X[i]) >= B:
        i += 1
    X[i].append(X[i][-1] - 1)
    s -= 1
Y = []
for x in X:
    for xx in x:
        Y.append(xx)

D = {a: i for i, a in enumerate(sorted(Y))}
Y = [D[y] + 1 for y in Y]
print(*Y)

n,a,b = map(int,input().split())

if(n > a*b)|(a+b > n+1):
    print(-1)
    return
if(a==1)|(b==1):
    if(b==n):
        ans = list(range(n,0,-1))
        print(' '.join(map(str,ans)))
    elif(a==n):
        ans = list(range(1,n+1))
        print(' '.join(map(str,ans)))
    else:
        print(-1)
    return

ans = []
top = n
while(top > 0):
    if(top-a >= b):
        for i in range(top-a+1,top+1):
            ans.append(i)
        top -= a
        b -= 1
        continue
    a = top-b+1
    for i in range(top-a+1,top+1):
        ans.append(i)
    for i in range(b-1,0,-1):
        ans.append(i)
    break

print(' '.join(map(str,ans)))

def solve(n, a, b):
    if n < a + b - 1:
        return [-1]
    if n > a * b:
        return [-1]
    if b == 1:
        return list(range(1, n + 1))
    if a == 1:
        return list(range(n, 0, -1))

    ans = list(range(b, 0, -1))
    ans.extend(list(range(n - a + 2, n + 1)))

    t = b
    for t in range(2 * b - 1, n - a + 1, b - 1):
        ans.extend(list(range(t, t - b + 1, -1)))
    ans.extend(list(range(n - a + 1, t, -1)))
    return ans


n, a, b = list(map(int, input().split()))
print((*solve(n, a, b)))


N,A,B = map(int,input().split())
if A + B > N + 1 or A * B < N:
	print(-1)
	return
swap = False
if A < B:
	B,A = A,B
	swap = True

base = [i for i in range(1,A+1)]
rest = N - A
roop = (N + A - 1) // A
if roop == B:
	a = A + 1
	pre = []
	while a <= N:
		pre = [i for i in range(a, min(N+1, a+A))] + pre
		a += A
else:
	pre = [i for i in range(A+B-1, A, -1)]
	r = []
	a = A+B
	while a <= N:
	  r = [i for i in range(a, min(N+1, a+A-1))] + r
	  a += A-1
	pre = pre + r
ans = pre + base
if swap:
	ans = [N-i+1 for i in ans]
print(" ".join(map(str, ans)))

N,A,B=list(map(int,input().split()))

if A*B<N or A+B-1>N:
    print((-1))
    return

rev=(B>A)
A,B=max(A,B),min(A,B)
B-=1
M=N
ans1=[]
ans2=[]
while M>0:
    if len(ans1)==len(ans2):
        temp=[i for i in range(M+1-A,M+1)]
        ans1.append(temp)
        M=M-A
        A-=1
    else:
        temp=[i for i in range(M+1-B,M+1)]
        temp=temp[::-1]
        ans2.append(temp)
        M=M-B
        B-=1

ans2=ans2[::-1]
res=[]
for L in ans1:
    res+=L
for L in ans2:
    res+=L

res=[val for val in res if val>0]
if rev:
    res=res[::-1]
print((*res))