add depths path to traveller, used to detect cycle