What is {position held} of {John Marshall} that is {replaced by} is {James Madison} ?
when was John marshall succeeded by James Madison?
SELECT ?obj WHERE { wd:Q310829 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q11813 }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q310829> .
?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> ?obj .
?statement <http://www.wikidata.org/entity/P1366> <http://wikidata.dbpedia.org/resource/Q11813>
} 

When was John Marshall replaced by James Madison?