Let $\operatorname{cif}(x)$ denote the sum of the digits of the number $x$ in the decimal system. Put $a_1=1997^{1996^{1997}}$, and $a_{n+1}=\operatorname{cif}(a_n)$ for every $n>0$. Find $\lim_{n\to\infty}a_n$.
1. **Understanding the problem**: We need to find the limit of the sequence \(a_n\) defined by \(a_1 = 1997^{1996^{1997}}\) and \(a_{n+1} = \operatorname{cif}(a_n)\), where \(\operatorname{cif}(x)\) denotes the sum of the digits of \(x\).

2. **Modulo 9 property**: The sum of the digits of a number \(x\) in the decimal system is congruent to \(x \mod 9\). This is a well-known property of numbers in base 10. Therefore, \(a_n \equiv a_{n+1} \pmod{9}\).

3. **Initial value modulo 9**: We need to find \(1997 \mod 9\):
   \[
   1997 = 1 + 9 + 9 + 7 = 26 \quad \text{and} \quad 26 = 2 + 6 = 8
   \]
   Thus, \(1997 \equiv 8 \pmod{9}\).

4. **Exponentiation modulo 9**: Next, we consider \(1996^{1997} \mod 9\). First, find \(1996 \mod 9\):
   \[
   1996 = 1 + 9 + 9 + 6 = 25 \quad \text{and} \quad 25 = 2 + 5 = 7
   \]
   Thus, \(1996 \equiv 7 \pmod{9}\).

5. **Even exponent property**: Since \(1996^{1997}\) is an even number, we have:
   \[
   7^{1997} \equiv (-2)^{1997} \equiv (-1)^{1997} \cdot 2^{1997} \equiv -2^{1997} \pmod{9}
   \]
   Since \(1997\) is odd, we need to find \(2^{1997} \mod 9\). Notice that \(2^6 \equiv 1 \pmod{9}\), so:
   \[
   2^{1997} = 2^{6 \cdot 332 + 5} = (2^6)^{332} \cdot 2^5 \equiv 1^{332} \cdot 32 \equiv 32 \equiv 5 \pmod{9}
   \]
   Therefore:
   \[
   -2^{1997} \equiv -5 \equiv 4 \pmod{9}
   \]
   Thus, \(1996^{1997} \equiv 4 \pmod{9}\).

6. **Combining results**: Since \(1997 \equiv 8 \pmod{9}\) and \(1996^{1997} \equiv 4 \pmod{9}\), we have:
   \[
   1997^{1996^{1997}} \equiv 8^4 \pmod{9}
   \]
   Calculate \(8^4 \mod 9\):
   \[
   8^2 = 64 \equiv 1 \pmod{9} \quad \text{and} \quad 8^4 = (8^2)^2 \equiv 1^2 = 1 \pmod{9}
   \]
   Therefore:
   \[
   1997^{1996^{1997}} \equiv 1 \pmod{9}
   \]

7. **Sequence behavior**: Since \(a_1 \equiv 1 \pmod{9}\), it follows that \(a_n \equiv 1 \pmod{9}\) for all \(n\). The sequence \(a_n\) is decreasing and bounded below by 1. Therefore, it must eventually reach 1 and stay there.

8. **Bounding the sequence**: We can show that the sequence decreases rapidly:
   \[
   a_1 = 1997^{1996^{1997}} < (10^{10})^{(10^{10})^{(10^4)}} = 10^{10^{10^5+1}}
   \]
   \[
   a_2 < 9 \cdot 10^{10^5+1} < 10 \cdot 10^{10^5+1} = 10^{10^6}
   \]
   \[
   a_3 < 9 \cdot 10^6 < 10^7
   \]
   \[
   a_4 < 9 \cdot 7 = 63
   \]
   \[
   a_5 < 9 \cdot 6 = 54
   \]
   \[
   a_6 < 9 \cdot 5 = 45
   \]
   \[
   a_7 < 9 \cdot 4 = 36
   \]
   \[
   a_8 < 9 \cdot 3 = 27
   \]
   \[
   a_9 < 9 \cdot 2 = 18
   \]
   \[
   a_{10} < 9 \cdot 1 = 9
   \]
   Since \(a_{10} < 10\) and \(a_{10} \equiv 1 \pmod{9}\), we have \(a_{10} = 1\).

9. **Conclusion**: Therefore, \(a_n = 1\) for all \(n \geq 10\), and the limit is:
   \[
   \lim_{n \to \infty} a_n = 1
   \]

The final answer is \(\boxed{1}\)