What is the {constitutional republic} for {head of state} of {Moon Jae-in}
Which constitutional republic is Moon Jae-in the head of state for?
Moon Jae-in is the head of state of which constitutional republic?
SELECT DISTINCT ?l WHERE { ?l property:head_of_state resource:Moon_Jae-in . ?l rdf:type ontology:constitutional_republic }
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/Q21001> . ?subj <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q1520223> } 
 select distinct ?sbj where { ?sbj wdt:P35 wd:Q21001 . ?sbj wdt:P31 wd:Q1520223 } 
South Korea