> 
> Let $G$ be a nonempty set with an associative operation and for each $a\in G$ exists only one $a'\in G$ such that $aa'a=a$. Prove that $G$ is a group.
> 
> 
> 

I tried playing with the fact that $aa'a=a$ and the only thing I found is that $(a')'=a$. Then I tried proving that for each $a,b\in G$, $aa'=bb'$ (which means we can write $e=aa'$ and then $G$ has an identity) but I couldn't get anything meaningful.

Proof that $(a')'=a$ (by request):

$aa'a=a$  

$a'aa'a=a'a$ (multiply by $a'$ from left side)  

$a(a'aa')a=a(a')a$ (multiply by $a$ from right side)  

We know that $a'$ is the only one that satisfy $aa'a=a$ and therfore $a'aa'=a'$ (whice means that $(a')'=a$.