Problem

Source: 2018 Belarusian National Olympiad 10.1

Tags: geometry, circumcircle



The extension of the median $AM$ of the triangle $ABC$ intersects its circumcircle at $D$. The circumcircle of triangle $CMD$ intersects the line $AC$ at $C$ and $E$.The circumcircle of triangle $AME$ intersects the line $AB$ at $A$ and $F$. Prove that $CF$ is the altitude of triangle $ABC$.