Beyond, Inc. interview question

iterate through this multi-linked data structure