for every block r that contains a page reference to x

get parent block p of r

if block p contains -> and a page reference to relationship

return parent of s

get child block c of r

if block c contains <- and a page reference to relationship

return all children of s