What screenwriter influenced M1 , was influenced by M2 and M3 , and influenced M4 's writer and director
SELECT DISTINCT ?x0 WHERE {
?x0 a ns:film.writer .
?x0 ns:influence.influence_node.influenced ?x1 .
?x0 ns:influence.influence_node.influenced M1 .
?x0 ns:influence.influence_node.influenced_by M2 .
?x0 ns:influence.influence_node.influenced_by M3 .
?x1 ns:film.director.film M4 .
?x1 ns:film.writer.film M4
}