import java.util.*; public class Main{ public static void main(String args[] ) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for (int i = 1; i < n - 1; i++) { for (int j = i; j < n - i; j++) { if (n - i - j >= j) { System.out.println(i + " " + j + " " + (n - i - j)); } } } } }