Hierarchy classes generator