#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int W[N], P[N];
int main() {
int n, p, sum_profits = 0, sum_weights = 0;
cin>>n;
for(int i = 1; i <= n; i++) {
cout<<1<<" "<<i<<" "<<10000<<endl;
fflush(stdout);
cin>>p;
P[i] = p - sum_profits;
sum_profits = p;
int lo = 1, hi = 10000;
while(lo < hi) {
int mid = (lo + hi)/2;
cout<<1<<" "<<i<<" "<<mid<<endl;
fflush(stdout);
cin>>p;
if(p == sum_profits) hi = mid;
else lo = mid + 1;
}
W[i] = lo - sum_weights;
sum_weights = lo;
}
cout<<2<<endl;
for(int i = 1; i <= n; i++) cout<<W[i]<<" ";
cout<<endl;
for(int i = 1; i <= n; i++) cout<<P[i]<<" ";
cout<<endl;
fflush(stdout);
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpjb25zdCBpbnQgTiA9IDEwNTsKaW50IFdbTl0sIFBbTl07CgppbnQgbWFpbigpIHsKICBpbnQgbiwgcCwgc3VtX3Byb2ZpdHMgPSAwLCBzdW1fd2VpZ2h0cyA9IDA7CiAgY2luPj5uOwogIGZvcihpbnQgaSA9IDE7IGkgPD0gbjsgaSsrKSB7CiAgICBjb3V0PDwxPDwiICI8PGk8PCIgIjw8MTAwMDA8PGVuZGw7CiAgICBmZmx1c2goc3Rkb3V0KTsKICAgIGNpbj4+cDsKICAgIFBbaV0gPSBwIC0gc3VtX3Byb2ZpdHM7CiAgICBzdW1fcHJvZml0cyA9IHA7CiAgICBpbnQgbG8gPSAxLCBoaSA9IDEwMDAwOwogICAgd2hpbGUobG8gPCBoaSkgewogICAgICBpbnQgbWlkID0gKGxvICsgaGkpLzI7CiAgICAgIGNvdXQ8PDE8PCIgIjw8aTw8IiAiPDxtaWQ8PGVuZGw7CiAgICAgIGZmbHVzaChzdGRvdXQpOwogICAgICBjaW4+PnA7CiAgICAgIGlmKHAgPT0gc3VtX3Byb2ZpdHMpICBoaSA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