what is the {replaced by} for {Lester B. Pearson} has {position held} as {Prime Minister of Canada} ?
Who replaced Lester B. Pearson as Canadian Prime Minister?
Who is replaced as the Prime Minister of Canada, a position previously held by Lester B. Pearson?
SELECT ?i WHERE { resource:Lester_B._Pearson property:position_held ?q . ?q property:replaced_by ?i . ?q property:position_held resource:Prime_Minister_of_Canada }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q128604> .
?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/Q839078> .
?statement <http://www.wikidata.org/entity/P1366> ?value. 
} 

SELECT ?value WHERE { wd:Q128604 p:P39 ?s . ?s ps:P39 wd:Q839078 . ?s pq:P1366 ?value}