Question: Which administrative territorial entity shares a border with Allegany County (whose inception time is 1789-01-01) and is named after Hampshire (which shares a border with the Isle of Wight)?
Choices: San Juan County
Hampshire County
Lee County
Cass County
United States Virgin Islands
Washoe County
Kent County
Orange County
Greene County
Delaware County
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "administrative territorial entity" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Allegany County" . ?e_1 <inception> ?pv . ?pv <pred:date> "1789-01-01"^^xsd:date .  ?e <named_after> ?e_2 . ?e_2 <pred:name> "Hampshire" . ?e_2 <shares_border_with> ?e_3 . ?e_3 <pred:name> "Isle of Wight" .  }
Program:
function: Find
inputs: Allegany County
function: FilterDate
dependencies: 0
inputs: inception
1789-01-01
=
function: Relate
dependencies: 1
inputs: shares border with
backward
function: FilterConcept
dependencies: 2
inputs: administrative territorial entity
function: Find
inputs: Isle of Wight
function: Relate
dependencies: 4
inputs: shares border with
backward
function: Find
inputs: Hampshire
function: And
dependencies: 5
6
function: Relate
dependencies: 7
inputs: named after
backward
function: FilterConcept
dependencies: 8
inputs: administrative territorial entity
function: And
dependencies: 3
9
function: What
dependencies: 10
Answer: Hampshire County