#include #include #include #include using namespace std; int main(){ int n; cin>>n; int a=1; while(a<=n/3){ int bc=n-a; int b=a; while(b<=bc/2){ printf("%d %d %d\n",a,b,bc-b); b++; } a++; } return 0; }