We assume that $n \geqslant 3$. Let $u$ be an endomorphism of $E$ nilpotent of index 2 and of rank $r$. Assume that $\operatorname{Im} u = \operatorname{Ker} u$ and that $\left(e_1, u\left(e_1\right), e_2, u\left(e_2\right), \ldots, e_r, u\left(e_r\right)\right)$ is a basis of $E$.
Give the matrix of $u$ in this basis.