#include #include int N; int main() { std::cin >> N; /* int n[3000]; for (int i = 1; i < 2999; i++) { n[i - 1] = i; } std::vector c(n, n + N - 2); for (int i = 0; i < N - 2; i++) { } */ int an = N / 3; for (int a = 1; a < an + 1; a++) { int bn = (N - a) / 2; for (int b = a; b < bn + 1; b++) { std::cout << a << " " << b << " " << N - a - b << std::endl; } } }