input: Write a python function to generate all triplets in a given range.
  assert gen_all_triplets(5) == [[1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4]]
  assert gen_all_triplets(4) == [[1, 2, 3]]
  assert gen_all_triplets(3) == []
output: def gen_all_triplets(n):
      triplets = []
      for i in range(1, n - 1):
          for j in range(i + 1, n):
              for k in range(j + 1, n + 1):
                  triplets.append([i, j, k])
      return triplets