#include using namespace std; using i64 = int64_t; using vi = vector; using vvi = vector; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout.setf(ios::fixed); cout.precision(10); int n; cin >> n; for (int i = 1; i < n; i++) { for (int j = i; j < n; j++) { int k = n - i - j; if (j <= k) { cout << i << " " << j << " " << k << '\n'; } } } }