What was written by M0 and produced by a producer and art director of M1 's prequel
SELECT DISTINCT ?x0 WHERE {
?x0 ns:film.film.produced_by|ns:film.film.production_companies ?x1 .
?x0 ns:film.film.written_by M0 .
?x1 ns:film.film_art_director.films_art_directed ?x2 .
?x1 ns:film.producer.film|ns:film.production_company.films ?x2 .
?x2 ns:film.film.sequel M1
}