using System; using System.Linq; using System.Collections.Generic; public class Solution { public static void Main() { var n = int.Parse(Console.ReadLine()); var result = 0; for (int a = 0; a * 3 < n; a++) { for (int b = a; a + b + b < n; b++) { for (int c = b; a + b + c < n; c++) { Console.WriteLine($"{a} {b} {c}"); } } } } }