Let $n \neq 0$. For every sequence of integers
\[A=a_0,a_1,a_2,\ldots,a_n\]
satisfying $0\leq a_i\leq i$, for $i=0,\ldots,n$, define another sequence
\[t(A)=t(a_0),t(a_1),t(a_2),\ldots,t(a_n)\]
by setting $t(a_i)$ to be the number of terms in the sequence $A$ that precede the term $a_i$ and are different from $a_i$. Show that, starting from any sequence $A$ as above, fewer than $n$ applications of the transformation $t$ lead to a sequence $B$ such that $t(B)=B$.