#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
struct node
{
int l,r,val;
node()
{
l=r=val=0;
}
};
node v[4*100000 + 5];
int lst=1;
int build(int s,int e)
{
int p=lst++;
if(s==e)
return p;
int mid=(s+e)/2;
v[p].l=build(s,mid);
v[p].r=build(mid+1,e);
return p;
}
int main()
{
const int n = 100000 ;
int r=build(1,n);
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKCnN0cnVjdCBub2RlCnsKICAgIGludCBsLHIsdmFsOwogICAgbm9kZSgpCiAgICB7CiAgICAgICAgbD1yPXZhbD0wOwogICAgfQp9OwoKbm9kZSB2WzQqMTAwMDAwICsgNV07CmludCBsc3Q9MTsKCmludCBidWlsZChpbnQgcyxpbnQgZSkKewogICAgaW50IHA9bHN0Kys7CiAgICBpZihzPT1lKQogICAgICAgIHJldHVybiBwOwogICAgaW50IG1pZD0ocytlKS8yOwogICAgdltwXS5sPWJ1aWxkKHMsbWlkKTsKICAgIHZbcF0ucj1idWlsZChtaWQrMSxlKTsKICAgIHJldHVybiBwOwp9CgoKaW50IG1haW4oKQp7CiAgICBjb25zdCBpbnQgbiA9IDEwMDAwMCA7CiAgICBpbnQgcj1idWlsZCgxLG4pOwogICAgcmV0dXJuIDA7Cn0K