you give undirected graph define integer n number node 2D integer array edge edge graph edgesi ui vi indicate undirected edge ui vi you give integer array querieslet incidenta b define number edge connect node bThe answer jth query number pair node b satisfy follow conditionsa bincidenta b queriesjreturn array answer answerslength querieslength answersj answer jth queryNote multiple edge nod Example 1input n 4 edge 1224132321 query 23output 65explanation the calculation incidenta b show table abovethe answer query follow answers0 6 all pair incidenta b value great 2 answers1 5 all pair 3 4 incidenta b value great 3example 2input n 5 edge 1515342513512325 query 12345output 1010986 Constraints2 n 2 1041 edgeslength 1051 ui vi nui vi1 querieslength 200 queriesj edgeslength