Question: How is Gotha, which borders Erfurt, related to Thuringia, which borders Hesse?
Choices: hair color
from fictional universe
geographic distribution
official language
parent club
director/manager
next higher rank
place of origin (Switzerland)
located in the administrative territorial entity
mouth of the watercourse
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Gotha" . ?e_3 <shares_border_with> ?e_1 . ?e_3 <pred:name> "Erfurt" . ?e_2 <pred:name> "Thuringia" . ?e_4 <shares_border_with> ?e_2 . ?e_4 <pred:name> "Hesse" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Erfurt
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Gotha
function: And
dependencies: 1
2
function: Find
inputs: Hesse
function: Relate
dependencies: 4
inputs: shares border with
forward
function: Find
inputs: Thuringia
function: And
dependencies: 5
6
function: QueryRelation
dependencies: 3
7
Answer: located in the administrative territorial entity