#include using namespace std; using ll = long long; #define fix(x) fixed << setprecision(x) #define rep(i, n) for(int i = 0; i < n; ++i) #define all(x) (x).begin(),(x).end() templatebool chmin(T&a, const T&b){if(a>b){a=b;return 1;}return 0;} templatebool chmax(T&a, const T&b){if(a> res; assert(res!=-1); return res; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vector> a(2); rep(i,n/2){ int x = query(2*i,2*i,2*i+1,2*i+1); a[x].emplace_back(2*i+1); a[!x].emplace_back(2*i); } int p = a[0][0], q = a[1][0]; for(int i=1;i