the brazilian empire was ruled by whom?
Entity Entity
m.0dl5hv6 m.0d4zh9
House of Orléans-Braganza House of Braganza
class entity
royalty.royal_line m.01nr2h
royalty.royal_line royalty.kingdom
Royal line brazilian empire
none none
royalty.royal_line.kingdom_s_ruled
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.royal_line . 
VALUES ?x1 { :m.01nr2h } 
?x0 :royalty.royal_line.kingdom_s_ruled ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND royalty.royal_line (JOIN royalty.royal_line.kingdom_s_ruled m.01nr2h))