Question: What country is American University of Beirut's location, which is twinned with Mexico City?
Choices:
United Arab Republic
Mexico
Lebanon
United Kingdom of Great Britain and Ireland
Sweden
Roman Republic
English
Indonesia
Guyana
Taiwan
Answer: Lebanon
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "American University of Beirut" . ?e_2 <pred:name> "Beirut" . ?e_3 <twinned_administrative_body> ?e_2 . ?e_3 <pred:name> "Mexico City" . ?e_1 <headquarters_location> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <headquarters_location> ; <pred:fact_t> ?e_2 ] <country> ?qpv .  }
Program:
function: Find
inputs: American University of Beirut
function: Find
inputs: Mexico City
function: Relate
dependencies: 1
inputs: twinned administrative body
forward
function: Find
inputs: Beirut
function: And
dependencies: 2
3
function: QueryRelationQualifier
dependencies: 0
4
inputs: headquarters location
country