Question: How is the United States of America related to lawyer John Quincy Adams?
Choices:
followed by
librettist
architect
notable people with this condition
basin country
film regional debut venue
operating system
director
patron saint
head of government
Answer: head of government
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "United States of America" . ?e_2 <pred:name> "John Quincy Adams" . ?e_2 <occupation> ?e_3 . ?e_3 <pred:name> "lawyer" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: United States of America
function: Find
inputs: lawyer
function: Relate
dependencies: 1
inputs: occupation
backward
function: Find
inputs: John Quincy Adams
function: And
dependencies: 2
3
function: QueryRelation
dependencies: 0
4