#include <cstdio>
#include <algorithm>
#include <iostream>
#include <string.h>
using namespace std;
const int maxn = 10010;
struct Tedge
{ int b, next; } e[maxn * 2];
int tree[maxn];
int zzz, n, z, edge, root, a, b, c;
int d[maxn][3];
int first[maxn], dep[maxn], w[maxn], fa[maxn], top[maxn],son[maxn], siz[maxn];
char ch[10];
void insert(int a, int b, int c)
{
}
void dfs(int v)
{
}
void build_tree(int v, int tp)
{
}
void update(int root, int lo, int hi, int loc, int x)
{
}
int maxi(int root, int lo, int hi, int l, int r)
{
}
inline int find(int va, int vb)
{
}
void init()
{
}
inline void read()
{
}
void work()
{
}
int main()
{
}