#include <bits/stdc++.h>
using namespace std;

unsigned long long rd(unsigned long long &x) {
	x ^= (x << 13);
	x ^= (x >> 7);
	x ^= (x << 17);
	return x;
}

typedef unsigned long long ull;
typedef long long ll;

template <typename T>
inline void read(T &f) {
	f = 0; int fu = 0; char c = getchar();
	while (c < '0' || c > '9') {
		if (c == '-') fu = 1;
		c = getchar();
	}
	while (c >= '0' && c <= '9') {
		f = f * 10 + (c - '0');
		c = getchar();
	}
	if (fu) f = -f;
}

const int md = 998244353, inv2 = (md + 1) / 2;

inline int add(int x, int y) {
	if (x + y >= md) return x + y - md;
	return x + y;
}

inline int sub(int x, int y) {
	if (x < y) return x - y + md;
	return x - y;
}

inline int mul(int x, int y) { return 1ull * x * y % md; }

inline int fpow(int x, int y) {
	int ans = 1;
	while (y) {
		if (y & 1) ans = mul(ans, x);
		y >>= 1; x = mul(x, x);
	}
	return ans;
}

inline int div2(int x) {
	if (x & 1) return (x + md) >> 1;
	return x >> 1;
}

#include <Windows.h>

mt19937 rng(GetTickCount());

int main() {
	freopen("noodle.in", "w", stdout);
	printf("0 10 %d\n", rng() % 1000000 + 1);
	for (int _ = 1; _ <= 10; _++) {
//		int n = rng() % 150 + 1, q = 150, x = rng() % n + 1, k = rng() % 100 + 1;
		int n, q, x, k;
		if (_ % 3 == 0) {
			n = 262144; q = 1000000; k = 135816365;
		}
		if (_ % 3 == 1) {
			n = 1000000; q = 235922; k = 10;
		}
		if (_ % 3 == 2) {
			n = rng() % 150 + 1; q = 150; k = rng();
			k = abs(k) + 1;
		}
		x = rng() % n + 1;
		if (n % 2 == 1) ++n;
		printf("%d %d %d %d\n", n, q, x, k);
		for (int i = 1; i <= n; i++) {
			int a = rng() % 998244353;
			printf("%d%c", a, i == n ? '\n' : ' ');
		}
	}
	return 0;
}
