#include void run(void){ int n; scanf("%d",&n); int a,b,c; for(a=1;a<=n/3;a++){ for(b=a;b<=(n-a)/2;b++){ c=n-a-b; printf("%d %d %d\n",a,b,c); } } return; } int main(void){ run(); return 0; }