/* Author: Yiu Yu Ho */ import java.io.*; import java.util.*; public class lotto { public Scanner in = new Scanner(System.in); public PrintStream out = System.out; public void main() { int n; TreeSet S; n=in.nextInt(); while(n>0) { n=6*n; S=new TreeSet(); for(int i=0;i