#include int main() { int n; std::cin >> n; for (int a = 1; a <= 3000; a++) { for (int b = a; b <= n - a - b; b++) { std::cout << a << " " << b << " " << n - a - b << std::endl; } } }