设矩阵 $\boldsymbol{A}=\left(\begin{array}{lll}1 & 2 & 3 \\ 0 & 1 & 2 \\ 0 & 0 & 1\end{array}\right), \boldsymbol{B}=\left(\begin{array}{lll}0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0\end{array}\right), \boldsymbol{E}$ 为 3 阶单位矩阵.
(1) 令 $\boldsymbol{M}=(\boldsymbol{A}-\boldsymbol{E})^{2023}+(\boldsymbol{A}-\boldsymbol{E})^{2022}+\cdots+(\boldsymbol{A}-\boldsymbol{E})^3+(\boldsymbol{A}-\boldsymbol{E})^2+\boldsymbol{A}-\boldsymbol{E}$, 求矩阵 $\boldsymbol{M}$;
(2)求一个可逆矩阵 $\boldsymbol{P}$, 使得 $\boldsymbol{P}^{-1} \boldsymbol{M P}=\boldsymbol{B}$.