Tree Queries

There is a tree.each node has a[i] value associated it it.for each query find maximum value from path u to v?
N<=10e5
Q=1e5