Consider an acute triangle $ABC$. Let $D$, $E$ and $F$ be the feet of the altitudes through vertices $A$, $B$ and $C$. Denote by $A'$, $B'$, $C'$ the projections of $A$, $B$, $C$ onto lines $EF$, $FD$, $DE$, respectively. Further, let $H_D$, $H_E$, $H_F$ be the orthocenters of triangles $DB'C'$, $EC'A'$, $FA'B'$. Show that $$H_DB^2 + H_EC^2 + H_FA^2 = H_DC^2 + H_EA^2 + H_FB^2.$$