what is the {replaced by} for {Heraclius} has {position held} as {Byzantine emperor} ?
Who came before Heraclius on the Byzantine throne?
Who preceded Heraclius as the Byzantine emperor?
SELECT ?y WHERE { ?s property:position_held resource:Byzantine_emperor . ?s property:replaced_by ?y . resource:Heraclius property:position_held ?s }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q41852> .
?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/Q18577504> .
?statement <http://www.wikidata.org/entity/P1366> ?value. 
} 

SELECT ?value WHERE { wd:Q41852 p:P39 ?s . ?s ps:P39 wd:Q18577504 . ?s pq:P1366 ?value}