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

public class TestGenerator {
    static int testN = 0;
    static Random random = new Random(366238);
    
    static PrintWriter next() {
	try {
	    return new PrintWriter(String.format("%02d", ++testN));
	} catch (IOException e) {
	    throw new RuntimeException(e);
	}
    }
    
    static void write(Integer... test) {
	PrintWriter out = next();
	out.println(test.length);
	for (int i = 0; i < test.length; ++i) {
	    out.print(test[i]);
	    if (i + 1 == test.length) {
		out.println();
	    } else {
		out.print(" ");
	    }
	}
	out.close();
    }
    
    static Integer[] generateIdentity(int n) {
	Integer[] rv = new Integer[n];
	for (int i = 0; i < n; ++i) {
	    rv[i] = i + 1;
	}
	return rv;
    }
    
    static void writeIdentity(int n) {
	write(generateIdentity(n));
    }
    
    static void writeReverse(int n) {
	Integer[] id = generateIdentity(n);
	Collections.reverse(Arrays.asList(id));
	write(id);
    }
    
    static void writeRandom(int n) {
	Integer[] id = generateIdentity(n);
	Collections.shuffle(Arrays.asList(id), random);
	write(id);
    }
    
    public static void main(String[] args) {
	write(3, 2, 1);
	write(1);
	write(1, 2, 3);
	write(1, 2);
	write(2, 1);
	
	writeIdentity(1000);
	writeReverse(1000);
	writeRandom(1000);
	writeRandom(1000);
	writeRandom(1000);
	
	writeIdentity(999);
	writeReverse(999);
	for (int i = 0; i < 5; ++i) {
    	    writeRandom(999);
    	}
	writeIdentity(1000);
	writeReverse(1000);
	for (int i = 0; i < 5; ++i) {
	    writeRandom(1000);
	}
	
	for (int i = 0; i < 8; ++i) {
	    writeIdentity(random.nextInt(1000) + 1);
	    writeReverse(random.nextInt(1000) + 1);
	    writeRandom(random.nextInt(1000) + 1);
	}
    }
}
