What is the {historical country} for {head of state} of {Paul von Hindenburg}
Which nation Paul von Hindenburg was the head of state of?
Which country Paul von Hindenburg was the head of state of?
SELECT DISTINCT ?w WHERE { ?w property:head_of_state resource:Paul_von_Hindenburg . ?w rdf:type ontology:historical_country }
select distinct ?subj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?subj . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P35> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q2667> . ?subj <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q3024240> } 
 select distinct ?sbj where { ?sbj wdt:P35 wd:Q2667 . ?sbj wdt:P31 wd:Q3024240 } 