



def       lowerCamelCase_  (    _a       :						list[list[int]]    ):



    '''simple docstring'''




    UpperCAmelCase_     :       Optional[Any]  		=					[list(_a    ) for row in matrix]
    if matrix and isinstance(_a   ,		_a    ):
        if isinstance(matrix[0]   ,		_a    ):
            UpperCAmelCase_     :       int  		=					0
            for row in matrix:
                if prev_len == 0:
                    UpperCAmelCase_     :       int  		=					len(_a    )
                    UpperCAmelCase_     :       Any  		=					True
                else:
                    UpperCAmelCase_     :       List[Any]  		=					prev_len == len(_a    )
        else:
            UpperCAmelCase_     :       Any  		=					True
    else:
        UpperCAmelCase_     :       Optional[int]  		=					False

    return result







def       lowerCamelCase_  (    _a       :						list[list[int]]    ):



    '''simple docstring'''




    if check_matrix(_a    ) and len(_a    ) > 0:
        UpperCAmelCase_     :       List[Any]  		=					[list(_a    ) for row in a]
        UpperCAmelCase_     :       Tuple  		=					len(_a    )
        if isinstance(a[0]   ,		_a    ):
            UpperCAmelCase_     :       str  		=					len(a[0]    )
        else:
            for dat in a:
                print(_a    )
            return

        # horizotal printing increasing
        for i in range(0   ,		_a    ):
            print(a[0][i]    )
        # vertical printing down
        for i in range(1   ,		_a    ):
            print(a[i][mat_col - 1]    )
        # horizotal printing decreasing
        if mat_row > 1:
            for i in range(mat_col - 2   ,		-1   ,		-1    ):
                print(a[mat_row - 1][i]    )
        # vertical printing up
        for i in range(mat_row - 2   ,		0   ,		-1    ):
            print(a[i][0]    )
        UpperCAmelCase_     :       List[Any]  		=					[row[1 : mat_col - 1] for row in a[1 : mat_row - 1]]
        if len(_a    ) > 0:
            spiral_print_clockwise(_a    )
        else:
            return
    else:
        print("""Not a valid matrix"""    )
        return







def       lowerCamelCase_  (    _a       :						list[list]    ):



    '''simple docstring'''




    if matrix:
        return list(matrix.pop(0    )    ) + spiral_traversal(list(zip(*_a    )    )[::-1]    )
    else:
        return []


# driver code
if __name__ == "__main__":
      import doctest

      doctest.testmod()

      UpperCamelCase_									=   [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]
      spiral_print_clockwise(a)








'''simple docstring'''





from math import cos, sin






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	=  float(lowercase__)
 return [[scaling_factor * int(x == y) for x in range(2)] for y in range(2)]






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	,						lowerCamelCase__	=  cos(lowercase__), sin(lowercase__)
 return [[c, -s], [s, c]]






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	,						lowerCamelCase__	=  cos(lowercase__), sin(lowercase__)
 lowerCamelCase__	=  c * s
 return [[c * c, cs], [cs, s * s]]






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	,						lowerCamelCase__	=  cos(lowercase__), sin(lowercase__)
 lowerCamelCase__	=  c * s
 return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(F"""    {scaling(5) = }""")
print(F"""  {rotation(45) = }""")
print(F"""{projection(45) = }""")
print(F"""{reflection(45) = }""")

