Question: What is the relationship between Tripoli (the one that is located in or next to Mediterranean Sea) and Beirut (the one whose population is 361366)?
Choices: newspaper format
nutrient
contains administrative territorial entity
place of publication
given name
twinned administrative body
residence
enclave within
this taxon is source of
hair color
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Tripoli" . ?e_1 <located_in_or_next_to_body_of_water> ?e_3 . ?e_3 <pred:name> "Mediterranean Sea" . ?e_2 <pred:name> "Beirut" . ?e_2 <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> "361366"^^xsd:double . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Mediterranean Sea
function: Relate
dependencies: 0
inputs: located in or next to body of water
backward
function: Find
inputs: Tripoli
function: And
dependencies: 1
2
function: Find
inputs: Beirut
function: FilterNum
dependencies: 4
inputs: population
361366
=
function: QueryRelation
dependencies: 3
5
Answer: twinned administrative body