#include <cstdio>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <ctime>
#include <cstring>
#include <cassert>
#include <sstream>
#include "random.h"

using namespace std;

#define forn(i, n) for(int i = 0; i < (int)(n); i++)
#define ford(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define last(a) int(a.size() - 1)
#define all(a) a.begin(), a.end()
#define seta(a,x) memset (a, x, sizeof (a))
#define I (int)

typedef long long int64;
typedef pair <int, int> pii;
typedef long double ldb;

const long double eps = 1e-9;
const int inf = (1 << 30) - 1;
const int64 inf64 = ((int64)1 << 62) - 1;
const long double pi = 3.1415926535897932384626433832795;

template <class T> T sqr (T x) {return x * x;}

//N, K, Amax, Tmax, Vmax, Wmax, seed
const int NMAX = 2000;
int a[NMAX];

int main (int argc, char **argv)
{
	if (argc < 8)
	{
	        cerr << 8 - argc << " arguments left (N, K, Amax, Tmax, Vmax, Wmax, seed)" << endl;
		return 0;
	}
	initrand (atoi (argv[1]));
	int N = atoi (argv[2]);
	int K = atoi (argv[3]);
	int Amax = atoi (argv[4]);
	int T = R (1, atoi (argv[5]));
	int V = R (1, atoi (argv[6]));
	int W = R (V, atoi (argv[7]));
	a[0] = R(0, Amax);
	for (int i = 1; i < N; i ++)
	{
		a[i] = a[i-1] + R(1, Amax);
	}
	printf ("%d\n", N);
	forn (i, N-1)
		printf ("%d ", a[i]);
	printf ("%d\n", a[N-1]);
	printf ("%d\n%d\n%d %d\n", T, K, V, W);
	return 0;
}
