import re class Node: ''' 容器,用来存储前后节点信息 ''' __slot__=[] def __init__(self,val,next_,pre,name,no): self.val = val self.next = next_ self.pre = pre self.name = name self.no = no class Tree: def __init__(self,li): self.root = Node(-1,[],None,'',-1) cur_