N = int(input()) a = 1 while a < int(N/3) + 1: b = a while b < int((N-a)/2) + 1: c = N - a - b print(a, b, c) b += 1 a += 1