n=int(input()) for x in range(1,~-n): for y in range(x,-~n-x): z=n-x-y if z0 and x<=y<=z:print(x,y,z)