#include using namespace std; int main() { int a, b, c, n; scanf("%d", &n); for (a = 1; a <= n / 3; a++) { for (b = a; b <= n / 2; b++) { if (a + 2 * b > n) break; for (c = b; c <= n - 2; c++) { if (a + b + c == n) { printf("%d %d %d\n", a, b, c); break; } } } } }