public static void Main()
int[] inputRowsAndCols = Console.ReadLine()
int rows = inputRowsAndCols[0];
int cols = inputRowsAndCols[1];
int[,] matrix = new int[rows, cols];
for (int row = 0; row < rows; row++)
int[] inputRowValues = Console.ReadLine()
for (int col = 0; col < cols; col++)
matrix[row, col] = inputRowValues[col];
for (int col = 0; col < cols; col++)
for (int row = 0; row < rows; row++)