n = int(input()) for a in range(1, n + 1): for b in range(a, n + 1): c = n - a - b if c < b: break print(a, b, c)