the genre for the tv show, my mad fat diary and the child genre, costume drama culminates in to what genre?
Entity
m.02822
Drama
class entity entity
tv.tv_genre m.0k8lh8v m.04xvh5
tv.tv_genre tv.tv_program film.film_genre
TV Genre My Mad Fat Diary Costume drama
none none none
tv.tv_program.genre media_common.media_genre.child_genres
Genre Child genres
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX : <http://rdf.freebase.com/ns/> 
SELECT (?x0 AS ?value) WHERE {
SELECT DISTINCT ?x0  WHERE { 
?x0 :type.object.type :tv.tv_genre . 
VALUES ?x1 { :m.0k8lh8v } 
VALUES ?x2 { :m.04xvh5 } 
?x1 :tv.tv_program.genre ?x0 . 
?x0 :media_common.media_genre.child_genres ?x2 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND tv.tv_genre (AND (JOIN (R tv.tv_program.genre) m.0k8lh8v) (JOIN media_common.media_genre.child_genres m.04xvh5)))