what is the {replaces} for {Tokhtamysh} has {position held} as {Khan} ?
Who is Tokhtamysh as Khan's successor?
Name the successor of Tokhtamysh as Khan.
SELECT ?r WHERE { ?j property:position_held resource:Khan . resource:Tokhtamysh property:position_held ?j . ?j property:replaces ?r }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q309585> .
?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/Q181888> .
?statement <http://www.wikidata.org/entity/P1365> ?value. 
} 

SELECT ?value WHERE { wd:Q309585 p:P39 ?s . ?s ps:P39 wd:Q181888 . ?s pq:P1365 ?value}