Who was influenced by a female spouse of M3 and was influenced by M1 's producer , art director , and writer
SELECT DISTINCT ?x0 WHERE {
?x0 a ns:people.person .
?x0 ns:influence.influence_node.influenced_by ?x1 .
?x0 ns:influence.influence_node.influenced_by ?x2 .
?x1 ns:film.film_art_director.films_art_directed M1 .
?x1 ns:film.producer.film|ns:film.production_company.films M1 .
?x1 ns:film.writer.film M1 .
?x2 ns:people.person.gender ns:m.02zsn .
?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 M3 .
FILTER ( ?x2 != M3 )
}