Jar is related to Preserve. 
Buy is related to Supermarket. you are likely to find Food in/at/on Supermarket. Cake is a type of Food. Wheat can be used for Cake. 
Jar <--RelatedTo--> Preserve 
Buy <--RelatedTo--> Supermarket <--AtLocation-- Food <--IsA-- Cake <--UsedFor-- Wheat 