What was written by a character , directed by M5 's star , and produced by M0 , M1 , M2 , and M3
SELECT DISTINCT ?x0 WHERE {
?x0 ns:film.film.directed_by ?x1 .
?x0 ns:film.film.produced_by|ns:film.film.production_companies M0 .
?x0 ns:film.film.produced_by|ns:film.film.production_companies M1 .
?x0 ns:film.film.produced_by|ns:film.film.production_companies M2 .
?x0 ns:film.film.produced_by|ns:film.film.production_companies M3 .
?x0 ns:film.film.written_by ?x2 .
?x1 ns:film.actor.film/ns:film.performance.film M5 .
?x2 a ns:fictional_universe.fictional_character
}