import java.util.*;

public class Transform {
    public int[][] transformImage(int[][] mat, int n) {
        // write code here
        int [][] mat2 = new int [n][n];
        for(int i = 0;i<n;i++){
            for(int j =0;j<n;j++){
                mat2[j][i] = mat[n-i-1][j];
            }
        }
        return mat2;
    }
}