A theorem on finite algebras