func (t *LinkCutTree) Depth(i int) int {
	return t.nodes[i].depth()
}
Depth returns a depth of node i.
package misc
type LinkCutTree struct {
	nodes []*linkCutNode
}
func NewLinkCutTree(size int) *LinkCutTree {
	t := &LinkCutTree{
		nodes: make([]*linkCutNode, size),
	}
	for i := range t.nodes {
		t.nodes[i].id = i
		t.nodes[i].update()
	}
	return t
}
func (t *LinkCutTree) Link(i, j int) {
	a := t.nodes[i]
	b := t.nodes[j]
	a.link(b)
}
func (t *LinkCutTree) Cut(i int) {
	t.nodes[i].cut()
}
func (t *LinkCutTree) IsConnected(i, j int) bool {
	a := t.nodes[i]
	b := t.nodes[j]
	return a.id == b.id
}
func (t *LinkCutTree) Root(i int) int {
	return t.nodes[i].root().id
}