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

public class TestGen {

	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;
	Random rnd;
	int tNumber;

	class Test {
		void printTest() throws FileNotFoundException {
			if (tNumber < 10)
				out = new PrintWriter("../tests/0" + tNumber);
			else
				out = new PrintWriter("../tests/" + tNumber);
			tNumber++;
			out.println(a.size());
			for (int i = 0; i < a.size(); i++) {
			if (a.get(i) > 0) {
				if (a.get(i) <= 1000000) {
					out.print(a.get(i));
				} else {
					out.print(1000000);
				}
			} else {
				out.print(1);
			}
				if (i < a.size() - 1) {
					out.print(' ');
				} else {
					out.println();
				}
			}
			out.close();
		}
		
		void genPreliminary() throws FileNotFoundException {
			out = new PrintWriter("../preliminary/01");
			out.println(6);
			out.println("3 4 3 2 1 5");
			out.close();
		}
		
		ArrayList<Integer> a;
		
		void genSequence(int n, int k, int c) throws FileNotFoundException {
			a = new ArrayList<Integer>();
			int t = rnd.nextInt(100) + 1;
			if (tNumber >12)
				t = t + 500000;
			for (int i = 0; i < n; i++) {
				t = t + (k + rnd.nextInt(10) * c);
				a.add(t);
			}
			printTest();
		}

		public void genRandom(int n, int k) throws FileNotFoundException {
			a = new ArrayList<Integer>();
			for (int i = 0; i < n; i++) {
				a.add(1 + k + rnd.nextInt(1000000 - k));
			}
			printTest();
		}
		
		
	}

	public String nextToken() throws IOException {
		while ((st == null) || (!st.hasMoreTokens()))
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	
	public void solve() throws IOException {
		tNumber = 1;
		rnd = new Random(31);
		Test t = new Test();
		
		t.genPreliminary();
		
		t.genSequence(1, 0, 0);
		t.genSequence(2, 0, 1);
		t.genSequence(2, -1, 1);
		t.genSequence(2, 1, 1);
		t.genSequence(100, 0, 1);
		
		t.genSequence(100, 0, -1);
		t.genSequence(100, 1, 1);
		t.genSequence(100, -1, -1);
		t.genSequence(100, -5, 1);
		t.genSequence(100, 5, -1);
		
		t.genRandom(100, 0);
		t.genRandom(100, 0);
		t.genRandom(100000, 1000);
		t.genRandom(100000, 1000);
		t.genSequence(100000, 0, 1);
		
		t.genSequence(100000, 0, -1);
		t.genSequence(100000, 1, 1);
		t.genSequence(100000, -1, -1);
		t.genSequence(100000, -5, 1);
		t.genSequence(100000, 5, -1);
		
		
	}

	public void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void main(String[] args) {
		new TestGen().run();
	}
}