what is the {replaces} for {William H. Seward} has {position held} as {United States Secretary of State} ?
Who followed William H. Seward as United States Secretary of State?
Who was the U.S. Secretary of State after William H. Seward?
SELECT ?i WHERE { ?i property:replaces ?i . resource:William_H._Seward property:position_held ?i . ?i property:position_held resource:United_States_Secretary_of_State }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q297308> .
?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/Q14213> .
?statement <http://www.wikidata.org/entity/P1365> ?value. 
} 

SELECT ?value WHERE { wd:Q297308 p:P39 ?s . ?s ps:P39 wd:Q14213 . ?s pq:P1365 ?value}