#include #include #include using namespace std; int main() { int N; cin >> N; for (int a = 1; a <= N; a++) { for (int b = a; b <= N; b++) { int c = N - a - b; if (c > 0 && b<=c) { cout << a << " " << b << " " << c << endl; } } } return 0; }