what is the {replaced by} for {Baibars} has {position held} as {Sultan of Egypt} ?
Who was the sultan of Egypt after Baibars?
Who replaced Baibars as the Sultan of Egypt?
SELECT ?n WHERE { ?l property:position_held resource:Sultan_of_Egypt . ?l property:replaced_by ?n . resource:Baibars property:position_held ?l }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q192960> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q4115925> .
?statement <http://www.wikidata.org/entity/P1366> ?value. 
} 

SELECT ?value WHERE { wd:Q192960 p:P39 ?s . ?s ps:P39 wd:Q4115925 . ?s pq:P1366 ?value}