package main import . "fmt" import . "os" import bf "bufio" func main() { rd:=bf.NewReader(Stdin) var n int Fscan(rd,&n) tree:=make([][]int,n+1) for e:=0;e