#include //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //using namespace atcoder; using namespace std; using ll = long long; #define all(A) A.begin(),A.end() using vll = vector; #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) using Graph = vector>>; int main() { ll N; cin >> N; for (ll a = 1; a < N;a++) { for (ll b = a; b< N; b++) { ll c = N - a - b; if (b <= c) { cout << a << " " << b << " " << c << endl; } } } }