What was written by a spouse of M0 and directed by a parent of a actor of M1
SELECT DISTINCT ?x0 WHERE {
?x0 ns:film.film.directed_by ?x1 .
?x0 ns:film.film.written_by ?x2 .
?x1 ns:people.person.children|ns:fictional_universe.fictional_character.children|ns:organization.organization.child/ns:organization.organization_relationship.child ?x3 .
?x2 ns:people.person.spouse_s/ns:people.marriage.spouse|ns:fictional_universe.fictional_character.married_to/ns:fictional_universe.marriage_of_fictional_characters.spouses M0 .
?x3 ns:film.actor.film/ns:film.performance.character M1 .
FILTER ( ?x2 != M0 )
}