Direct sum/Nilpotent mapping/Exercise

Let be a linear mapping, and let be a direct sum of -invariant linear subspaces. Show that is nilpotent if and only if and are nilpotent.