Let $\Delta$ be the set of all triangles inscribed in a given circle, with angles whose measures are integer numbers of degrees different than $45^\circ,90^\circ$ and $135^\circ$. For each triangle $T\in\Delta$, $f(T)$ denotes the triangle with vertices at the second intersection points of the altitudes of $T$ with the circle. (a) Prove that there exists a natural number $n$ such that for every triangle $T\in\Delta$, among the triangles $T,f(T),\ldots,f^n(T)$ (where $f^0(T)=T$ and $f^k(T)=f(f^{k-1}(T))$) at least two are equal. (b) Find the smallest $n$ with the property from (a).