Goat is related to Animal. Animal is related to Snake. you are likely to find Snake in/at/on Shed. 
Islam is related to Devil. Devil is a synonym of Cow. 
Goat <--RelatedTo--> Animal <--RelatedTo--> Snake --AtLocation--> Shed 
Islam <--RelatedTo--> Devil <--Synonym--> Cow 