Solution (source code)

= Solution
{c}

Call $k$ a <peak of a sequence> when $a_k\geq a_m$ for every $m>k$. If there are infinitely many <peaks of a sequence>, list their indices in increasing order, $k_1<k_2<\cdots$. Since $k_{r+1}>k_r$,
$$
\boxed{a_{k_1}\geq a_{k_2}\geq\cdots.}
$$
This is a decreasing <subsequence>; throughout this argument, a decreasing <monotone sequence> may have equal successive terms.

If there are only finitely many <peaks of a sequence>, choose $N$ beyond all their indices; take $N=1$ if there are none. Every $n\geq N$ fails to be a <peak of a sequence>, so some $m>n$ satisfies $a_m>a_n$. Starting with $n_1=N$, choose such an $n_{r+1}>n_r$ recursively. This gives
$$
\boxed{a_{n_1}<a_{n_2}<\cdots.}
$$
The two cases prove the <monotone subsequence theorem> without any boundedness hypothesis.