using System; using System.Text; using System.Linq; using System.Collections.Generic; class Program { private static readonly Scanner sc = new Scanner(); private static readonly StringBuilder sb = new StringBuilder(); static void Main(string[] args) { int n = sc.Int; for (var i = 1; i < n; i++) { for (var j = i; j < n; j++) { int c = n - i - j; if (c < j) break; sb.AppendLine(i + " " + j + " " + c); } } Console.WriteLine(sb.ToString()); } } class Scanner { private string[] _str = new string[0]; private int _i; public string Line { get { return Console.ReadLine(); } } public string Str { get { if (_i >= _str.Length) { _str = Line.Split(' '); _i = 0; } return _str[_i++]; } } public string[] StrArr { get { return Line.Split(' '); } } public int Int { get { return int.Parse(Str); } } public int[] IntArr { get { return Line.Split(' ').Select(int.Parse).ToArray(); } } public long Long { get { return long.Parse(Str); } } public long[] LongArr { get { return Line.Split(' ').Select(long.Parse).ToArray(); } } public double Double { get { return double.Parse(Str); } } public double[] DoubleArr { get { return Line.Split(' ').Select(double.Parse).ToArray(); } } }