Amazon Interview Question

Design a data structure that handles circular dependancy