what is the {replaced by} for {Paschal II} has {position held} as {pope} ?
which is the {replaced by} for {Paschal II} that has {position held} as {pope} ?
which is the {replaced by} for {Paschal II} that has {position held} as {pope} ?
SELECT ?k WHERE { ?l property:position_held resource:pope . resource:Paschal_II property:position_held ?l . ?l property:replaced_by ?k }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q227967> .
?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/Q19546> .
?statement <http://www.wikidata.org/entity/P1366> ?value. 
} 

SELECT ?value WHERE { wd:Q227967 p:P39 ?s . ?s ps:P39 wd:Q19546 . ?s pq:P1366 ?value}