For an arbitrary point $D$ on side $BC$ of an acute-angled triangle $ABC$, let $O_1$ and $O_2$ be the circumcenters of the triangles $ABD$ and $ACD$, and $O$ be the circumcenter of the triangle $AO_1O_2$. Find the locus of $O$ when $D$ moves across $BC$.