Share your proof of HW 1 problem 1.

Let $(M,p,e)$ be a monoid and let $m \in M$. Define a new product $p_m$ on $M$ by $p_m(a,b)=a\cdot m \cdot b$. Show that this product is associative (so $(M, p_m)$ is a semigroup). Under what conditions on $m$ do we have a unit $e_m$ relative to $p_m$ so that $(M, p_m, e_m)$ is again a monoid?