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