Hello,
I have a sample graph generated by the following command
CREATE p = (:x {name: 'a'}) -[:next]-> (:y {name: 'b'})-[:next]-> (:x {name: 'c'})-[:next]-> (:y {name: 'd'}), q = (:y {name: 'b'})-[:next]-> (:x {name: 'c'})-[:next]-> (:y {name: 'd'}),...