hierarchical egg problem