n = int(input())-1 from itertools import combinations for i,j in combinations(range(n),2): print(i+1,j-i,n-j)