this easy version problem the difference easy hard version number queriesPolycarp grow tree n vertex we remind tree n vertex undirecte connect graph n vertex n1 edge contain cycleshe call set vertex passable path tree pass vertex set pass edge twice the path visit vertex setin word set vertex call passable simple path pass vertex set possibly otherfor example tree set 3 2 5 1 5 4 1 4 passable 1 3 5 1 2 3 4 5 Polycarp ask answer q query each query set vertex for query need determine correspond set vertex passable