import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.PriorityQueue; import java.util.Scanner; import java.util.TreeSet; public class Main { public static int RANGE = 100; public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final int offset = 5; TreeSet sets = new TreeSet(); for(int i = 0; i < offset; i++){ sets.add(i + 1); sets.add(N - i); } for(final int a : sets){ for(final int b : sets){ for(final int c : sets){ if(a + b + c <= N){ System.out.println(a + " " + b + " " + c); } } } } } }