#include<bits/stdc++.h>
template<typename _Tp>void read(_Tp &x){
	char ch=getchar();bool f=0;while(!isdigit(ch))f|=ch=='-',ch=getchar();
	x=ch&15,ch=getchar();while(isdigit(ch))x=x*10+(ch&15),ch=getchar();
	if(f)x=-x;
}
template<typename _Tp,typename ...Args>void read(_Tp &x,Args &...args){read(x),read(args...);}
std::mt19937 rnd(std::chrono::steady_clock::now().time_since_epoch().count());
int main(){
	int T=1,seed=rnd()%1000;printf("%d %d %d\n",0,T,seed);
	while(T--){
		int n=rnd()%2500*2+2,q=1000,x=rnd()%n+1;long long kmax=rnd()%5000+1;
		n=98304,q=2e6,kmax=1e18;
		printf("%d %d %d %lld\n",n,q,x,kmax);
		for(int i=1;i<=n;++i)printf("%d%c",rnd()%998244353," \n"[i==n]);
	}
	return 0;
}
