A right-angled triangle $ABC$ is given. Its catheus $AB$ is the base of a regular triangle $ADB$ lying in the exterior of $ABC$, and its hypotenuse $AC$ is the base of a regular triangle $AEC$ lying in the interior of $ABC$. Lines $DE$ and $AB$ meet at point $M$. The whole configuration except points $A$ and $B$ was erased. Restore the point $M$.