Semiperfect ring