In a cricket game, an over is a set of six valid deliveries of balls performed by one player ― the bowler for this over.
Consider a cricket game with a series of $N$ overs (numbered $1$ through $N$) played by $K$ players (numbered $1$ through $K$). Each player may be the bowler for at most $L$ overs in total, but the same player may not be the bowler for any two consecutive overs. Assign exactly one bowler to each over in such a way that these rules are satisfied or determine that no such assignment exists.

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first and only line of each test case contains three space-separated integers $N$, $K$ and $L$. 

-----Output-----
For each test case:
- If there is no valid assignment of bowlers to overs, print a single line containing the integer $-1$.
- Otherwise, print a single line containing $N$ space-separated integers. For each valid $i$, the $i$-th of these integers should be the number of the player assigned as the bowler for the $i$-th over.

-----Constraints-----
- $1 \le T \le 30$
- $1 \le N, K, L \le 10,000$

-----Example Input-----
2
4 3 2
5 4 1

-----Example Output-----
1 2 3 2
-1

-----Explanation-----
Example case 1: The following is a valid assignment:
- Bowler 1 bowls the $1$-st over.
- Bowler 2 bowls the $2$-nd and $4$-th overs.
- Bowler 3 bowls the $3$-rd over.
It is valid since no bowler bowls more than $2$ overs and each two consecutive overs have different bowlers.
Example case 2: There is no valid assignment in which each of $4$ players bowls at most $1$ over out of $5$.

Starter code:

Solutions:
t=int(input())
for i in range(t):
 n,k,l=map(int,input().split())
 if k*l<n:
  print(-1)
 elif (k==1 and n>1):
  print(-1)
 else:
  for j in range(n):
   print((j%k)+1,end=' ')
  print()

t=int(input())
for i in range(t):
 n,k,l=map(int,input().split())
 if k*l<n:
  print(-1)
 elif (k==1 and n>1):
  print(-1)
 else:
  for j in range(n):
   print((j%k)+1,end=' ')
  print()

T=int(input())
for i in range(T):
 N,K,L=map(int,input().split())
 if K*L<N:
  print(-1)
 elif (K==1 and N>1):
  print(-1)
 else:
  for j in range(N):
   print((j%K)+1,end=' ')
  print()

T=int(input())
for i in range(T):
 N,K,L=map(int,input().split())
 if K*L<N:
  print(-1)
 elif (K==1 and N>1):
  print(-1)
 else:
  for j in range(N):
   print((j%K)+1,end=' ')
  print()


for _ in range(int(input())):
 N,K,L = map(int,input().split())
 if (K*L<N):
  print(-1)
 elif (K==1 and N>1):
  print(-1)
 else:
  s=1
  for i in range(1,N+1):
   if s>K:
    s=1
    print(s,end=' ')
   else:
    print(s,end=' ')
   s=s+1
 print("")

# cook your dish here
for _ in range(int(input())):
 N,K,L = map(int,input().split())
 if (K*L<N):
  print(-1)
 elif (K==1 and N>1):
  print(-1)
 else:
  s=1
  for i in range(1,N+1):
   if s>K:
    s=1
    print(s,end=' ')
   else:
    print(s,end=' ')
   s=s+1
 print("")

# cook your dish here
t=int(input())
while t>0:
 n,k,l=map(int,input().split())
 if(k*l<n or (k==1 and n>1)):
  print("-1")
 else:
  for i in range(n):
   print((i%k)+1,end=" ")
  print()
 t-=1

t=int(input())
for i in range(t):
 n,k,l=list(map(int,input().split()))
 m,v=[],[]
 for i in range(1,n+1):
  v.append(i)
 if n>(k*l) or (k==1 and n>1):
  print(-1)
 else:
  for i in range(n):
   m.append(v[i%k])
  print(*m)


# cook your dish here
t=int(input())
while t>0:
 n,k,l=map(int,input().split())
 l1=[]
 if k*l<n:
  print("-1")
 elif n>1 and k==1:
  print("-1")
 else:
  o=1
  for i in range(n):
   l1.append(o)
   o+=1
   if o>k:
    o=1
  print(*l1)
 t-=1

for tt in range(int(input())):
 n,k,l=list(map(int,input().split()))
 o=n//k
 if(k==1):
  if(n>1):
   print(-1)
  else:
   print(1)
  continue
 if(n%k>0):
  o+=1
 if(o>l):
  print(-1)
  continue
 if(n%k>0):
  o-=1
 l=[]
 for i in range(n):
  l.append(i%k+1)
 print(*l)


for _ in range(int(input())):
 N ,K, L = input().split(" ")
 N, K, L = int(N), int(K), int(L)
 if K * L < N or (K == 1 and N > 1):
  print(-1)
 else:
  print(*[int(i%K)+1 for i in range(N)])


# cook your dish here
for _ in range(int(input())):
 n,k,l=list(map(int,input().split()))
 if k*l<n or (k==1 and n>1):
  print(-1)
 else:
  d=1 
                 # 2
                #4 3 2
          
  
  for i in range(1,n+1):
   if d>k:
    d=1
   print(d,end=" ")
   d+=1
  print()

t=int(input())
while(t):
 n,k,l=map(int,input().split())
 if k*l<n:
  print(-1)
 elif k==1 and n>1:
  print(-1)
 else:
  a,b=divmod(n,k)
  l=[i for i in range(1,k+1)]
  print(*(a*l) + l[:b] )
 t-=1

for _ in range(int(input())):
 n,k,l = map(int,input().split())
 if k*l<n or (k==1 and n!=1):
  print(-1)
 else:
  i = 1
  for _ in range(n):
   print(i,end=' ')
   if i==k: i=0
   i+=1
  print()

# cook your dish here
for _ in range(int(input())):
 n,k,l=map(int,input().split())
 if l*k<n or (n>1 and k==1):
  print("-1")
 else:
  i=1
  for j in range(n):
   if i>k:
    i=1
   print(i,end=" ")
   i+=1
  print("")

# cook your dish here
t=int(input())
while(t>0):
 val=str(input()).split(" ")
 n=int(val[0])
 k=int(val[1])
 l=int(val[2])
 
 if(n>k*l or (n>1 and k==1)):
  print(-1)
 else:
  i=1
  for a in range(n):
   if i>k:
    i=1
   print(i,end=" ")
   i+=1
  print()
 t-=1

# cook your dish here
for _ in range(int(input())):
 N,K,L=(int(i) for i in input().split(' '))
 if(((N/K)>L) or (K==1 and N!=K)):
  print(-1)
 else:
  noOfSessions=(N//K)+1
  bowlerLst=list(range(1,K+1))
  totalOvers=(bowlerLst*noOfSessions)[:N]
  print(*totalOvers)


# cook your dish here
for _ in range(int(input())):
 N, K, L = map(int, input().split())
 if K*L < N:
  print(-1)
 elif K == 1 and N > 1:
  print(-1)
 else:
  l = []
  for i in range(K):
   l.append(i+1)
  l = l*L 
  print(*l[:N])

# cook your dish here
for _ in range(int(input())):
 N, K, L = map(int, input().split())
 if K*L < N:
  print(-1)
 elif K == 1 and N > 1:
  print(-1)
 else:
  l = []
  for i in range(K):
   l.append(i+1)
  l = l*L 
  print(*l[:N])

for _ in range(int(input())):
 n,k,l=map(int,input().split())
 if(n>k*l or (n>1 and k==1) or n<=0):
  print("-1")
 else:
  temp=1
  for i in range(0,n):
   print(temp,end=" ")
   temp=(temp+1)%k
   if(temp==0):
    temp=k
  print()

for _ in range(int(input())):
 N, K, L = map(int, input().split(" "))
 if N == 1 and K == 1:
  print(1)
 elif K * L >= N and K != 1:
  for i in range(N):
   print((i % K) + 1, end=" ")
  print()
 else:
  print(-1)

t = int(input())
for _ in range(t):
 ans= -1
 n,l,k = input().split()
 n = int(n)
 l = int(l)
 k = int(k)
 if (k*l >= n) and (l!=1 or n==1)  :
  i=1
  j=1
  while i <= n:
   if j <= l:
    print(j, end=" ")
   else: 
    j=1
    print(j,end=" ")
   j = j+1
   i = i+1
 else:
  print(ans,end="")
 print()
    

for _ in range(int(input())):
 n,k,l=list(map(int,input().split()))
 if k*l<n or (k==1 and n>1):
  print(-1)
 else:
  d=1
  for i in range(1,n+1):
   if d>k:
    d=1
   print(d,end=" ")
   d+=1
  print()