Nesting categories in three levels