what is the {replaces} for {Thomas Henry Huxley} has {position held} as {President of the Royal Society} ?
Thomas Henry Huxley was replaced by who for the President of the Royal Society?
Who replaced Thomas Henry Huxley as the President of the Royal Society?
SELECT ?t WHERE { ?h property:position_held resource:president_of_the_Royal_Society . resource:Thomas_Henry_Huxley property:position_held ?h . ?h property:replaces ?t }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q184366> .
?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/Q55713110> .
?statement <http://www.wikidata.org/entity/P1365> ?value. 
} 

SELECT ?value WHERE { wd:Q184366 p:P39 ?s . ?s ps:P39 wd:Q55713110 . ?s pq:P1365 ?value}