What is the {country} for {head of state} of {Mahmoud Abbas}
What country is Mahmoud Abbas the head of state of?
Who is the  {country} for {head of state} of {Mahmoud Abbas}
SELECT DISTINCT ?i WHERE { ?i property:head_of_state resource:Mahmoud_Abbas . ?i rdf:type ontology: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/Q127998> . ?subj <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q6256> } 
 select distinct ?sbj where { ?sbj wdt:P35 wd:Q127998 . ?sbj wdt:P31 wd:Q6256 } 