import java.util.Scanner;
class ab
{
public static void main(String []args)
{
Scanner a = new Scanner(System.in);
int [][] arr1 = new int[4][3];
int [][] arr2 = new int[3][4];
//input
System.out.println("Enter array values");
for(int i = 0;i<=3;i++)
{
for(int j=0;j<=2;j++)
{
arr1[i][j]=a.nextInt();
}
}
for(int i=0;i<=2;i++)
{
for(int j=0;j<=3;j++)
{
arr2[i][j] = arr1[j][i];
}
}
//output
System.out.println("Output is");
for(int i=0;i<=2;i++)
{
for(int j=0;j<=3;j++)
{
System.out.print(arr2[i][j]+" ");
}
System.out.println("");
}
}
}
class ab
{
public static void main(String []args)
{
Scanner a = new Scanner(System.in);
int [][] arr1 = new int[4][3];
int [][] arr2 = new int[3][4];
//input
System.out.println("Enter array values");
for(int i = 0;i<=3;i++)
{
for(int j=0;j<=2;j++)
{
arr1[i][j]=a.nextInt();
}
}
for(int i=0;i<=2;i++)
{
for(int j=0;j<=3;j++)
{
arr2[i][j] = arr1[j][i];
}
}
//output
System.out.println("Output is");
for(int i=0;i<=2;i++)
{
for(int j=0;j<=3;j++)
{
System.out.print(arr2[i][j]+" ");
}
System.out.println("");
}
}
}