#include<bits/stdc++.h>
using namespace std;
int n=1e5,m=1e5,V=1e9;
random_device seed;
mt19937 rd(seed());
int ran(int l,int r){
return rd()%(r-l+1)+l;
}
signed main(){
cout<<n<<" "<<m<<"\n";
for(int i=1;i<=n;i++) cout<<ran(1,V)<<" ";
cout<<"\n";
for(int i=1,l,r,op;i<=m;i++){
l=r=0,op=ran(1,2);
cout<<op<<" ";
while(l==r) l=ran(1,n),r=ran(1,n);
if(l>r) swap(l,r);
cout<<l<<" "<<r<<" ";
if(op==1) cout<<ran(1,V)<<"\n";
else cout<<"\n";
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
signed main(){
while(1){
system("P4690-gene.exe > t.in");
system("P4690-std.exe < t.in > std.out");
system("P4690.exe < t.in > mine.out");
if(system("fc std.out mine.out")) return 0;
}
return 0;
}