#include using namespace std; int c[100005]; int main () { int n; cin >> n; cout.flush(); int s, d, kk = 0, a = 1, p, mij; while (a <= n){ ++kk; c[kk] = a; s = a; d = n; while (s <= d){ mij = (s+d) / 2; cout << 1 << " " << a << " " << mij << '\n'; cout.flush(); cin >> p; //cout << '\n' << cout.flush(); cout.flush(); if (p == 1){ s = mij + 1; } else { d = mij - 1; } } /*if (p == 0){ --s; }*/ a = d + 1; } cout << 2 << " " << kk << " "; for (int i = 1; i <= kk; ++i){ cout << c[i] << " "; } cout << '\n'; cout.flush(); return 0; }