#include using namespace std; typedef long long ll; signed main() { // freopen("testcase.in", "r", stdin); // freopen("testcase.out", "w", stdout); ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; for (int a = 1; a <= n - 2; a++) for (int b = a; 2 * b <= n - a; b++) { cout << a << " " << b << " " << n - a - b << "\n"; } }