Question: What country shares a border with Iran and Afghanistan?
Paraphrase: Which country has Iran and Afghanistan on its border?
SPARQL (Wikidata): SELECT ?value WHERE { wd:Q794 p:P47 ?s . ?s ps:P47 wd:Q889 . ?s pq:P805 ?value}