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

public class do30 implements Runnable {
    public void solve() throws IOException {
        int n = 100000;
        int k = 10000;

        int[] order = new int[2 * k];
        for (int i = 0; i < k; i++) {
            order[i] = i + 1;
        }
        for (int i = 0; i < k; i++) {
            order[k + i] = -(i + 1);
        }

        Random random = new Random(301720424);
        for (int i = 0; i < 2 * k; i++) {
            int j = random.nextInt(i + 1);
            int t = order[i];
            order[i] = order[j];
            order[j] = t;
        }

        int[] indp = new int[k + 1];
        int[] indpop = new int[k + 1];
        int[] indn = new int[k + 1];
        int[] orderop = new int[k];
        int[] nextop = new int[k + 1];
        int z = 0;


        for (int i = 0; i < 2 * k; i++) {
            if (order[i] > 0) {
                indp[order[i]] = i;
                orderop[z++] = order[i];
                indpop[order[i]] = z - 1;
            }
            if (order[i] < 0) {
                indn[-order[i]] = i;
            }
        }

        int theNextOp = 0;
        for (int i = 2 * k - 1; i >= 0; i--) {
            if (order[i] > 0) {
                theNextOp = order[i];
            } else {
                nextop[-order[i]] = theNextOp;
            }
        }

        int[] seq = new int[2 * n];
        int[] stack = new int[n];
        int sp = 0;
        for (int i = 0; i < 2 * n; i++) {
            if (sp == 0) {
                seq[i] = random.nextInt(k) + 1;
                stack[sp++] = seq[i];
            } else {
                if (random.nextDouble() < 0.9 && 2 * n - i - 1 >= sp + 1) {
                    seq[i] = random.nextInt(k) + 1;
                    stack[sp++] = seq[i];
                } else {
                    seq[i] = -stack[--sp];
                }
            }
        }

        int[] lastOp = new int[2 * n];
        for (int i = 0; i < 2 * n; i++) {
            if (seq[i] > 0) {
                if (sp > 0) {
                    lastOp[i] = stack[sp - 1];
                }
                stack[sp++] = seq[i];
            } else {
                sp--;
            }
        }

        int l = random.nextInt(2 * n + 1);
        System.err.println(l);

        sp = 0;
        for (int i = 0; i < l; i++) {
            if (seq[i] > 0) {
                stack[sp++] = seq[i];
            } else {
                sp--;
            }
        }

        for (int i = l; i < 2 * n; i++) {
            if (sp == 2 * n - i) {
                seq[i] = -stack[--sp];
            } else {
                seq[i] = orderop[k - 1];
                stack[sp++] = seq[i];
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(1);
        out.println(n + " " + k);
        for (int i = 0; i < 2 * k; i++) {
            out.print(order[i]);
            if (i < 2 * k - 1) {
                out.print(" ");
            }
        }
        out.println();
        for (int i = 0; i < 2 * n; i++) {
            out.print(seq[i]);
            if (i < 2 * n - 1) {
                out.print(" ");
            }
        }
        out.println();
        out.close();
    }

    public void run() {
        try {
            solve();
        } catch (IOException e) {
        }
    }

    public static void main(String[] arg) {
        new Thread(new do30()).start();
    }
}