#
# 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
#
# 
# @param mat int整型二维数组 
# @param n int整型 
# @return int整型二维数组
#
class Solution:
    def rotateMatrix(self , mat: List[List[int]], n: int) -> List[List[int]]:
        # write code here
        def col2row(mat, col_index):
            return [mat[i][col_index] for i in range(n-1, -1, -1)]

        res = []
        for i in range(n):
            res.append(col2row(mat, i))
        return res