N=int(input()) for i in range(1,N//3+10): for j in range(i,N+1): if i<=j<=N-i-j: print(i,j,N-i-j)