which ruler is the leader of a kingdom that is also ruled by timurid dynasty?
Entity Entity Entity Entity Entity
m.042b8 m.01g90 m.044yp m.03n84 m.073tr
Akbar Babur Jahangir Humayun Shah Jahan
class class entity
royalty.monarch royalty.kingdom m.020cn3
royalty.monarch royalty.kingdom royalty.royal_line
Monarch Kingdom Timurid dynasty
none none none
royalty.kingdom.rulers royalty.royal_line.kingdom_s_ruled
Rulers Kingdom(s) ruled
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 :royalty.monarch . 
?x1 :type.object.type :royalty.kingdom . 
VALUES ?x2 { :m.020cn3 } 
?x1 :royalty.kingdom.rulers ?x0 . 
?x2 :royalty.royal_line.kingdom_s_ruled ?x1 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND royalty.monarch (JOIN (R royalty.kingdom.rulers) (JOIN (R royalty.royal_line.kingdom_s_ruled) m.020cn3)))