you give tree consist n vertex Initially vertex value 0you need perform m query type you give vertex index v print value vertex v you give vertex index u v value k d d le 20 you need add k value vertex distance vertex path u v equal d the distance vertex x y equal number edge path x y for example distance x x equal 0the distance vertex v path x y equal minimum distance v vertex path x y