A good user interface for this could be dictionary `level_keys` where the key specifies parent node and the value specifies child node.