Question: How is the 2nd US Congress related to the James Madison who held the office of US President?
Choices: official symbol
child astronomical body
nutrient
continent
mouth of the watercourse
native language
participant
director of photography
fictional universe described in
geography of topic
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "2nd United States Congress" . ?e_2 <pred:name> "James Madison" . ?e_2 <position_held> ?e_3 . ?e_3 <pred:name> "President of the United States" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: 2nd United States Congress
function: Find
inputs: President of the United States
function: Relate
dependencies: 1
inputs: position held
backward
function: Find
inputs: James Madison
function: And
dependencies: 2
3
function: QueryRelation
dependencies: 0
4
Answer: participant