Hierarchical Storage and Query
Since the depth is variable and an item can have multiple parents, I recommend a general "relationship", not a parent-child hierarchy.

See this for the optimal way to write a many-to-many table.

Then you need to write multiple queries, not a single, fixed-depth, query.  There is no "good" way to traverse a tree/DAG/web (until 8.0, with CTEs).  And the speed of multiple queries, with suitable indexes and suitable caching, should be quite adequate.