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