What film whose director influenced M2 and M3 did M1 write
SELECT DISTINCT ?x0 WHERE {
?x0 a ns:film.film .
?x0 ns:film.film.directed_by ?x1 .
?x0 ns:film.film.written_by M1 .
?x1 ns:influence.influence_node.influenced M2 .
?x1 ns:influence.influence_node.influenced M3
}