Module of finite length $\implies$ finite direct sum of indecomposable modules I'm trying to solve the following question.

Let $M$ be an $R$-module of finite length (i.e, both Artinian and Noetherian). Prove that it is isomorphic to a finite direct sum of indecomposable submodules.

I was thinking I could induct on the length, though I'm having a difficulty in the induction step.
Base case holds trivially. If for all modules of length $ <n $, the proposition holds, consider a module of length $n$, which has the following decomposition:$$ M \supset M_1 \supset \ldots \supset M_n \supset (0) $$
By the Induction hypotheses, $M_1$ is isomorphic to a finite direct sum of indecomposable modules.
Now, if I show that the following short exact sequence splits, then I'm done.
$$ 0 \rightarrow M_{1} \rightarrow M \rightarrow M/M_1 \rightarrow 0 $$
But I'm unable to do this. Any help will be appreciated.

If $M$ is indecomposable, you're done. Otherwise, $M=X\oplus Y$, with $X$ and $Y$ both nonzero.
Now prove that the lengths of $X$ and $Y$ are less than the length of $M$.
Hint: build composition series for $X$ and $Y$ and paste them up.
