Data Model along with Count's is as follows:
Nodes: A(40),B(100)
Relationship: AA(self-relation with nodes of label A) count: 36, AB(from A to B) count:0
Query1:
Match (p:A)-[b:AA]->(p1)
OPTIONAL MATCH (p1)-[d:AB]->(c:B)
RETURN p,p1,b,d,c
Output: A(...