Cab is related to Passenger. Passenger is related to Aircraft. Airplane is a type of Aircraft. 
Building is related to Work. Work is related to Painter. 
Cab <--RelatedTo--> Passenger <--RelatedTo--> Aircraft <--IsA-- Airplane 
Building <--RelatedTo--> Work <--RelatedTo--> Painter 