There is a tree with n vertices rooted at node 1.
You have to given Q queries.Each query have two integer a and b, you have to tell bth parent of ath node.
Input
Output
Constraints
Second parent of 4th & 5th node is 1. Second parent does not exist for 1,2,3.