What is {position held} of {Charles VIII of France} that is {replaces} is {Louis XI of France} ?
What positin did Louis XI of France hold that Charles VIII of France took over?
What is position held by Charles VIII of France who replaces Louis XI of France?
SELECT ?m WHERE { ?s property:position_held ?m . resource:Charles_VIII_of_France property:position_held ?s . ?s property:replaces resource:Louis_XI_of_France }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q134452> .
?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> ?obj .
?statement <http://www.wikidata.org/entity/P1365> <http://wikidata.dbpedia.org/resource/Q8058>
} 

SELECT ?obj WHERE { wd:Q134452 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1365 wd:Q8058 }