import java.util.Scanner; import java.io.PrintWriter; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintWriter pw = new PrintWriter(System.out); int N = sc.nextInt(); sc.close(); for (int i = 1; i < N - 1; ++i) { for (int j = i; j < N - i; ++j) { if (i + 2 * j <= N) pw.println(i + " " + j + " " + (N - i - j)); } } pw.close(); } }