what is the {replaces} for {Bhumibol Adulyadej} has {position held} as {King of Thailand} ?
What is the name of the person who replaced Bhumibol Adulyadeg as the King of Thailand?
Who replaced Bhumibol Adulyadej as King of Thailand?
SELECT ?h WHERE { ?m property:replaces ?h . resource:Bhumibol_Adulyadej property:position_held ?m . ?m property:position_held resource:King_of_Thailand }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q855252> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q27330121> .
?statement <http://www.wikidata.org/entity/P1365> ?value. 
} 

SELECT ?value WHERE { wd:Q855252 p:P39 ?s . ?s ps:P39 wd:Q27330121 . ?s pq:P1365 ?value}