#include using namespace std; int main() { int N; cin >> N; for (int i = 1; i <= N / 3; i++) { for (int j = i; j <= (N - i) / 2; j++) { cout << i << " " << j << " " << N - i - j << "\n"; } } }