import java.io.*;
import java.util.*;

public class TestGenerator{

	final static int MAX_N = 100;
	final static int MAX_K = 300;
	final static int MAX_P = 100001;
	static Random rand;
	
	public static int randomInt(Random rand, int modulo) {
		return java.lang.Math.abs(rand.nextInt()) % modulo + 1;
	}
	
	public static void main(String[] args) {
		PrintWriter out = new PrintWriter(System.out);
		rand = new Random();
		
		int n = randomInt(rand, MAX_N);
		int m = randomInt(rand, n);
		int k = randomInt(rand, MAX_K);
		out.println(n + " " + m + " " + k);
		for(int i = 0; i < n; ++i) {
			out.print(rand.nextInt(MAX_P) + " " + rand.nextInt(MAX_P) + " " + rand.nextInt(MAX_P) + " ");
			out.println(rand.nextInt(MAX_P) + " " + rand.nextInt(MAX_P) + " " + rand.nextInt(MAX_P));
		}
		
		out.close();
	}

}