english: As you can see, all $S$ and $S^{-1}$ besides the ones on the very left and very right will cancel, leaving you with $A^{k}=SD^{k}S^{-1}$.
non_english: うぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅぅうぐぅうぐぅぐ～ぐ～ぐ～。。。。