SELECT DISTINCT ?uri WHERE { <http://dbpedia.org/resource/Dolley_Madison> <http://dbpedia.org/ontology/spouse> ?uri. <http://dbpedia.org/resource/William_Eustis> <http://dbpedia.org/property/president> ?uri}
Which president of William Eustus also married to Dolley Madison ?
SELECT DISTINCT ?g WHERE { resource:Dolley_Madison property:spouse ?g . resource:William_Eustis property:president ?g }
James Madison
[James Madison] is the partner of Dolley Madison and president of William Eustis.
[James Madison] is a partner of Day Madison and the president of William Justice.
The married to of the Dolley Madison and President of the William Eustis is [James Madison].
He is married to Day Madison, and the president of William Justice is [James Madison].