what is the {replaces} for {Bonaventure} has {position held} as {cardinal-bishop} ?
Who is the cardinal-bishop after Bonaventure?
Who replaced Bonaventure as cardinal-bishop?
SELECT ?x WHERE { ?w property:position_held resource:cardinal-bishop . ?w property:replaces ?x . resource:Bonaventure property:position_held ?w }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q43746> .
?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/Q1729113> .
?statement <http://www.wikidata.org/entity/P1365> ?value. 
} 

SELECT ?value WHERE { wd:Q43746 p:P39 ?s . ?s ps:P39 wd:Q1729113 . ?s pq:P1365 ?value}