what is the {replaced by} for {Thurgood Marshall} has {position held} as {Associate Justice of the Supreme Court of the United States} ?
By whom Thurgood Marshall was replaced as the associate judge of the US Supreme Court?
Who replaced Thurgood Marshall as the Associate Justice of the Supreme Court of the US?
SELECT ?n WHERE { ?l property:position_held resource:Associate_Justice_of_the_Supreme_Court_of_the_United_States . ?l property:replaced_by ?n . resource:Thurgood_Marshall property:position_held ?l }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q312348> .
?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/Q11144> .
?statement <http://www.wikidata.org/entity/P1366> ?value. 
} 

SELECT ?value WHERE { wd:Q312348 p:P39 ?s . ?s ps:P39 wd:Q11144 . ?s pq:P1366 ?value}