Let $\operatorname{cif}(x)$ denote the sum of the digits of the number $x$ in the decimal system. Define $a_1 = 1997^{1996^{1997}}$, and for every $n > 0$, let $a_{n+1} = \operatorname{cif}(a_n)$. Find $\lim_{n \to \infty} a_n$.

Let's think step by step and output the final answer within \boxed{}.
user