question: Which screenwriter did M3 's cinematographer , star , producer , and writer influence , M1 influence , and M2 marry
query: SELECT DISTINCT ?x0 WHERE {
  ?x0 a ns:film.writer .
  ?x0 ns:influence.influence_node.influenced_by ?x1 .
  ?x0 ns:influence.influence_node.influenced_by M1 .
  ?x0 ns:people.person.spouse_s/ns:people.marriage.spouse|ns:fictional_universe.fictional_character.married_to/ns:fictional_universe.marriage_of_fictional_characters.spouses M2 .
  ?x1 ns:film.actor.film/ns:film.performance.film M3 .
  ?x1 ns:film.cinematographer.film M3 .
  ?x1 ns:film.producer.film|ns:film.production_company.films M3 .
  ?x1 ns:film.writer.film M3 .
  FILTER ( ?x0 != M2 )
  }