Insert all data and use graph traversal