class treenode: def __init__(self,val,num): self.num = num self.child = [] self.val = val n = int(input()) a = list(map(int,input().split(' '))) root = treenode(a[0],1) beifen = root fa = list(map(int,input().split(' '))) for i in range(1,len(a)): index = 0 out =...