public class Matrix {
  
  /**
   * Take the transpose of the square matrix.
   * 
   * Do this "in place" (without an extra array).
   * 
   * For example,
   * 
   * 1 2 3         1 4 7
   * 4 5 6   -->   2 5 8
   * 7 8 9         3 6 9
   * 
   */ 
  public static void transpose(int[][] matrix) {
    // exercise: fill this in!
    
    // print(matrix)
  }
  
  public static void print(int[][] matrix) {
    // exercise: fill this in!
  }  
}