#include<iostream>
using namespace std;
const int N = 100010;
int e[N], l[N], r[N], idx;
void init()
{
l[1] = 0, r[0] = 1;
idx = 2;
}
//在k的右边添加值
void add_r(int k,int x)
{
e[idx] = x;
r[idx] = r[k];
l[idx] = k;
l[r[k]] = idx;
r[k] = idx;
idx++;
}
//在k的左边添加值
void add_l(int k, int x)
{
e[idx] = x;
r[idx] = k;
l[idx] = l[k];
r[l[k]] = idx;
l[k] = idx;
idx++;
}
void remove(int k)
{
r[l[k]] = r[k];
l[r[k]] = l[k];
}
int main()
{
}