For any positive integer $k$, let $f_1(k)$ denote the sum of the squares of the digits of $k$. For $n \ge 2$, let $f_n(k) = f_1(f_{n - 1}(k))$. Find $f_{2024}(12)$.
$f_1(12)=5$, then $25,29,85,89,145,42,20,4,16,37,58,89,\dots$: from $n=5$ on the values repeat with period $8$, $f_n$ being the $(n-5)\bmod 8$-th term of $89,145,42,20,4,16,37,58$ (counting from $0$).