Make bags iterable. Bag test. Starts algoritmh ot det. shex. Advance graph structure