#include #include using namespace std; int main(){ int N; cin >> N; for(int a = 1; a <= N / 3; a++){ for(int b = a; a + b * 2 <= N; b++){ cout << a << " " << b << " " << N - a - b << endl; } } }