Generalized perfect spaces