Which prequel of M0 's prequel starred M1 's director and was written by a spouse of M2 's editor
SELECT DISTINCT ?x0 WHERE {
?x0 ns:film.film.sequel ?x1 .
?x0 ns:film.film.starring/ns:film.performance.actor ?x2 .
?x0 ns:film.film.written_by ?x3 .
?x1 ns:film.film.sequel M0 .
?x2 ns:film.director.film M1 .
?x3 ns:people.person.spouse_s/ns:people.marriage.spouse|ns:fictional_universe.fictional_character.married_to/ns:fictional_universe.marriage_of_fictional_characters.spouses ?x4 .
?x4 ns:film.editor.film M2 .
FILTER ( ?x3 != ?x4 )
}