query: SELECT ?state ?stateLabel ?capital ?capitalLabel WHERE {
    ?state wdt:P31/wdt:P279* wd:Q3624078;
           wdt:P36 ?capital.
    MINUS { ?state wdt:P576|wdt:P582 ?end. }
    SERVICE wikibase:label {
      bd:serviceParam wikibase:language "en".
      ?state rdfs:label ?stateLabel.
      ?capital rdfs:label ?capitalLabel.
    } hint:Prior hint:runLast false.
    BIND(CONCAT("^[", ?stateLabel, "]*$") AS ?regex)
    FILTER(REGEX(?capitalLabel, ?regex, "i"))
    MINUS { ?capital wdt:P138 ?state. }
  }