a = [[i, j, 10 - i - j] for i in range(1, 9) for j in range(i, 10 - i) if i + 2 * j <= 10]
print(a)