This is somewhat inspired by Factoring a function from a finite set to itself.
Fix natural number $n$ and let $[n] := \{1,2,\ldots,n\}$. Set $g_0 \colon [n]\to [n]$ to be the identity, and for $i \geq 1$ define $g_i := f_i \circ g_{i-1}$ where the $f_i\colon [n] \to [n]$ are chosen (independently and) uniformly at random among all functions from $[n]$ to $[n]$.
What is the expected value of the smallest $t$ for which $g_t$ is a constant function? (More generally, what is the distribution of this random variable $t$?)