import java.io.PrintWriter;
import java.util.Random;

public class WheelGen {
    public static void main(String[] args) {
        int n = new Random().nextInt(1000) + 3;
        int m = 100000;
        int maxK = 1000000000;
        Random rnd = new Random();
        PrintWriter out = new PrintWriter(System.out);
        out.println(n);
        for (int i = 0; i < 2 * n; i++) {
            out.print(rnd.nextInt(maxK) + " ");
        }
        out.println();

        out.println(m);
        for (int i = 0; i < m; i++) {
            int a = rnd.nextInt(n);
            if (rnd.nextBoolean())
                out.println(0 + " " + (a + 1) + " " + rnd.nextInt(maxK));
            else
                out.println((a + 1) + " " + ((a + 1) % n + 1) + " " + rnd.nextInt(maxK));
        }
        out.close();
    }
}
