Hat can be used for Shade. Shade is related to Cloud. Cloud is a type of Affect. Attack is a type of Affect. 
Barn is etymologically related to Rest. Rest is related to Road. Road is related to Similar. Similar is related to Rifle. 
Hat --UsedFor--> Shade <--RelatedTo--> Cloud --IsA--> Affect <--IsA-- Attack 
Barn --EtymologicallyRelatedTo--> Rest <--RelatedTo--> Road <--RelatedTo--> Similar <--RelatedTo--> Rifle 