what is the {replaces} for {Miguel Díaz-Canel} has {position held} as {Prime Minister of Cuba} ?
Who became Cuba's Prime Minister after Miguel Diaz-Canel?
Who replaced Miguel Díaz-Canel as the Prime Minister of Cuba?
SELECT ?q WHERE { ?r property:position_held resource:Prime_Minister_of_Cuba . resource:Miguel_Díaz-Canel property:position_held ?r . ?r property:replaces ?q }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1932603> .
?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/Q6502015> .
?statement <http://www.wikidata.org/entity/P1365> ?value. 
} 

SELECT ?value WHERE { wd:Q1932603 p:P39 ?s . ?s ps:P39 wd:Q6502015 . ?s pq:P1365 ?value}