what is the {replaced by} for {John Hancock} has {position held} as {Governor of Massachusetts} ?
Who did John Hancock replace as Governor of Massachusetts?
who is the replaced by John Hancock has position held as Governor of Massachusetts ?
SELECT ?n WHERE { ?c property:replaced_by ?n . ?c property:position_held resource:Governor_of_Massachusetts . resource:John_Hancock property:position_held ?c }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q272774> .
?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/Q887117> .
?statement <http://www.wikidata.org/entity/P1366> ?value. 
} 

SELECT ?value WHERE { wd:Q272774 p:P39 ?s . ?s ps:P39 wd:Q887117 . ?s pq:P1366 ?value}