profile MATCH (phase:Phase {_id: "inputId1"})<-[:HAS]-(project:Project) MATCH (height:Height{height: 1, _id: "inputId2"}) MERGE (height)-[:HAS]->(phase) WITH phase, project MATCH (project)-[:HAS*0..]->(space:Space) MATCH p=(space:Space)-[:HAS*0..]->(...