what is the {replaced by} for {Yahya Khan} has {position held} as {Minister of Foreign Affairs} ?
What is Yahya Kahn's new position?
What is the new position for Yahya Khan who once held the position of Minister of Foreign affairs?
SELECT ?b WHERE { resource:Yahya_Khan property:position_held ?c . ?c property:position_held resource:Minister_of_Foreign_Affairs . ?c property:replaced_by ?b }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q333981> .
?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/Q2332457> .
?statement <http://www.wikidata.org/entity/P1366> ?value. 
} 

SELECT ?value WHERE { wd:Q333981 p:P39 ?s . ?s ps:P39 wd:Q2332457 . ?s pq:P1366 ?value}