Generalizing the notion of anti-inverse semigroup, we introduce the notion of $p$-semigroup, for arbitrary $p\in N$. We prove that every $p$-semigroup is covered by groups, classes of which are completely described.