The matrix \( A \) is nearly diagonal, expressible as \( A = D + N \), where \( D \) is a diagonal matrix and \( N \) is nilpotent. Alternatively, one can observe that all diagonal elements are 5 and \( A \) is upper triangular.
\[ A^3 = \left[ \begin{array}{ccc} 5 & 0 & 0 \\ 3 & 0 & 5 \\ 0 & 0 & 5 \end{array} \right]^3 \] As the diagonal eigenvalues are invariant under exponentiation and off-diagonal terms become zero, the cube of this matrix yields 125 on the diagonal and zeros elsewhere.