Endogenous and exogenous growth: Composition of the productive structure and output dynamics