#define _CRT_SECURE_NO_DEPRECATE
#pragma comment (linker, "/STACK:30000000")

#include <string>
#include <vector>
//#include <cmath>
//#include <queue>
//#include <set>
//#include <map>
//#include <algorithm>
#include <iostream>
//#include <cstdio>
//#include <sstream>
//#include <cassert>
//#include <utility>

using namespace std;

#define EPS 1E-8
const int INF = (int)1E+9;

#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define forv(i, v) for (int i = 0; i < (int)(v.size()); ++i)
#define fors(i, s) for (int i = 0; i < (int)(s.length()); ++i)
#define all(a) a.begin(), a.end()
#define pb push_back
#define PII pair<int, int>
#define mp make_pair
#define VI vector<int>
#define VS vector<string>

int n;
int a[100];

int ns[23] = {
1, 2, 3, 5, 7, 
9, 13, 15, 18, 21, 
23, 26, 27, 28, 29, 
31, 33, 34, 35, 36, 
37, 40, 40};

FILE *f;

int random(int value)
{
	return ((((unsigned int)rand()) << 15) + ((unsigned int)rand())) % value;
}

void outdata() {
}

void solve() {
	forn(i, n) {
		a[i] = random(1000000001);
	}
	sort(a, a + n);
	int k = random(n);
	random_shuffle(a, a + n);
	fprintf(f, "%d\n", n);
	forn(i, n) {
		if (i > 0) fprintf(f, " ");
		fprintf(f, "%d", a[i]);
	}
	fprintf(f, "\n%d\n", a[k] + (1 - random(2) * 2) * random(100));
}

void readdata() {
	char c[100];
	forn(i, 23) {
		sprintf(c, "%.2d", i + 3);
		f = fopen(c, "wt");
		n = ns[i];
		solve();
	}
}

int main() 
{
	readdata();
	solve();
	outdata();
	return 0;
}

