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