Given N nodes, each associated with a privilege allowlist and a blocklist, and a list of directed edges [A, B] meaning 'B inherits privileges from A', compute the final set of privileges each node possesses. Inheritance means a child node B starts with its own allowlist/blocklist and merges in privileges…