Array to store the level of each node
static int [ ] level = new int [ MAX ] ; static int [ , ] lca = new int [ MAX , log ] ; static int [ , ] minWeight = new int [ MAX , log ] ; static int [ , ] maxWeight = new int [ MAX , log ] ;