Solution (source code)

= Solution

For every rational $0\leq a<b$, part a implies $U[a,b]<\infty$ almost surely. The intersection of these probability-one events over the countable collection of rational pairs still has probability one. On this event, if
$$
\liminf_nX_n<\limsup_nX_n,
$$
some rational interval $[a,b]$ lies strictly between them, forcing infinitely many upcrossings, a contradiction. Thus $X_n$ has an extended limit almost surely.

The limit cannot be $+\infty$ on a set of positive probability: <Fatou lemma> and the <supermartingale> property give
$$
\mathbb E[\liminf_nX_n]
\leq\liminf_n\mathbb E X_n
\leq\mathbb E X_0<\infty.
$$
Nonnegativity excludes $-\infty$. Therefore $X_n$ converges almost surely to a finite random variable, proving the <almost sure supermartingale convergence theorem> in this case.