N = int(input()) for i in range(1, N): for j in range(i, N): k = N - i - j if k >= j: print(i, j, k)