# Find basis $\beta$ of $M$ such that $\phi(H)$ sits inside diagonal matrices, $\phi(S)$ sits inside upper triangular matrices w.r.t. basis $\beta$

Following question appeared in my Lie Algebra exam,but unfortunately i could not solve this question.

Let $L$ be a semi simple complex Lie Algebra and $\phi:L \to gl(M)$ be a finite dimensional representation of $L$.Let $H$ be Toral sub algebra of $L$ and $S$ be solvable sub algebra of $L$ containing $H$.Show that there exists a basis $\beta$ of $M$ such that $\phi(H)$ sits inside diagonal matrices $\phi(S)$ sits inside upper triangular matrices w.r.t. basis $\beta$

Since $H$ is Toral hence there exists a basis of $M$ such that every operator of $\phi(H)$ diagonal.Also Lie's theorem says that there will exist some basis corresponding to which every operator of $\phi(S)$ is upper triangular.I don't see how to obtain a common basis which satisfy the conditions of the given problem.