output_description: If it is impossible to partition the integers satisfying the condition, print
  `-1`. If it is possible, print N triples in the following format:
  
      
      
      a_1 b_1 c_1
      :
      a_N b_N c_N
      
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N K
attempt: N, K = map(int, input().split())
  l = [0] * 3 * N
  for i in range(3 * N):
      z = (i // (2 * N)) * (
          3
          * (
              (i % 2) * (N // 2 - (i % N) // 2 - 1)
              + (1 - i % 2) * (-(i % N) // 2 - N % 2)
          )
      )
      # print(i+K,z)
      #    print(i+K,(i//N+3*(i%N)+(i//N)*3*((N+1)//2)))
      l[(i // N + 3 * (i % N) + (i // N) * 3 * ((N + 1) // 2) + z) % (3 * N)] = i + K
  s = ("{} " * 3 + "\n") * N
  print(-1 if 2 * K - 1 > N else s.format(*l))
  # print(%(*l))
  
problem_description: Statement
  
  Given are positive integers N and K.
  
  Determine if the 3N integers K, K+1, ..., K+3N-1 can be partitioned into N
  triples (a_1,b_1,c_1), ..., (a_N,b_N,c_N) so that the condition below is
  satisfied. Any of the integers K, K+1, ..., K+3N-1 must appear in exactly one
  of those triples.
  
    * For every integer i from 1 to N, a_i + b_i \leq c_i holds.
  
  If the answer is yes, construct one such partition.
samples: [{"input": "1 1", "output": "1 2 3\n    \n\n* * *"}, {"input": "3 3", "output": "-1"}]