What did M0 write and a costume designer and producer of M1 and M2 produce
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_costumer_designer.costume_design_for_film M1 .
?x1 ns:film.film_costumer_designer.costume_design_for_film M2 .
?x1 ns:film.producer.film|ns:film.production_company.films M1 .
?x1 ns:film.producer.film|ns:film.production_company.films M2
}