#include<bits/stdc++.h>
#ifdef xay5421
#define D(...) fprintf(stderr,__VA_ARGS__)
#else
#define D(...) ((void)0)
#endif
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
#define each(x,v) for(auto&x:v)
#define SZ(x) ((int)(x).size())
#define pb push_back
#define eb emplace_back
using namespace std;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
int brand(){return rng()&0X7FFFFFFF;}
template<class T>
void rd(T&x){
	int f=0,c;
	while(!isdigit(c=getchar()))f^=!(c^45);
	x=(c&15);
	while(isdigit(c=getchar()))x=x*10+(c&15);
	if(f)x=-x;
}
const int P=998244353; //
inline int ad(int x,int y){return x+y>=P?x+y-P:x+y;}
inline int su(int x,int y){return x-y<0?x-y+P:x-y;}
inline int mu(int x,int y){return 1ULL*x*y%P;}
inline void uad(int&x,int y){(x+=y)>=P&&(x-=P);}
inline void usu(int&x,int y){(x-=y)<0&&(x+=P);}
template<class T>
inline void umax(T&x,const T&y){if(x<y)x=y;}
template<class T>
inline void umin(T&x,const T&y){if(y<x)x=y;}
int main(){
	freopen("noodle.in","w",stdout);
	int T=5;
	printf("0 %d %lu\n",T,rng());
	while(T--){
		int n=brand()%5000+1;
		//int n=brand()%2000000+1;
		if(n&1)++n;
		int q=brand()%20000+1,x=brand()%n+1;
		long long k_max=rng()%10000+1;
		printf("%d %d %d %lld\n",n,q,x,k_max);
		rep(i,1,n)printf("%d ",brand()%10+1);
		puts("");
	}
	return 0;
}
