SELECT DISTINCT ?uri WHERE { ?x <http://dbpedia.org/ontology/relation> <http://dbpedia.org/resource/Sarathchandra_Rajakaruna> . ?x <http://dbpedia.org/ontology/religion> ?uri . ?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/MemberOfParliament>}
What is the religion of the member of parliament who is a relative of Sarathchandra Rajakaruna?
SELECT DISTINCT ?f WHERE { ?b property:religion ?f . ?b rdf:type ontology:Member_Of_Parliament . ?b property:relation resource:Sarathchandra_Rajakaruna }
Buddhism
The religion of the member of parliament whose relative is Sarathchandra Rajakaruna is [Buddhism].
[Buddhism] is the religion of the member of parliament who is a relative of Sarathchandra Rajakaruna.
The religion of the member of parliament whose relation is him  is [Buddhism].
The religion of the MP with whom he is associated is [Buddhism].