import java.util.ArrayList; 

public class Two {
  public static void main(String[] args) {
    int n = Integer.parseInt(args[0]), 
        m = Integer.parseInt(args[1]); 
    ArrayList<ArrayList<Integer>> values = Two.createIt(n, m); 
    Two.fillIt(values); 
    Two.showIt(values); 
  }
  public static ArrayList<ArrayList<Integer>> createIt(int n, int m) {
    ArrayList<ArrayList<Integer>> values = new ArrayList<ArrayList<Integer>>(); 
    for (int i = 0; i < n; i++) {
      ArrayList<Integer> row = new ArrayList<Integer>(); 
      for (int j = 0; j < m; j++) {
        row.add( 0 ); 
      }
      values.add(row); 
    }
    // System.out.println( values ); 
    return values; 
  }
  public static void fillIt(ArrayList<ArrayList<Integer>> a) { 
    for (int i = 0; i < a.size(); i++) {
      for (int j = 0; j < a.get(i).size(); j++) {
        a.get(i).set(j, ( (int) (Math.random() * 100 - 50) )); 
      }
    }
    // System.out.println( a ); 
  } 
  public static void showIt(ArrayList<ArrayList<Integer>> a) { 
    for (ArrayList<Integer> row : a) {
      for (Integer value : row) {
        System.out.printf( "%4d", value ); 
      }
      System.out.println(); 
    }
  } 
}

/*

Welcome to DrJava. 
> run Two 5 4
 -10  36  41  29
 -37  15  17  49
 -42  12  24  37
  -4 -33 -16  -3
 -47 -20 -28  44
> run Two 12 18
   3 -49 -22  12 -29   4  44  47 -43  23 -33 -31  -2   0 -36  40   7 -37
   0 -35 -25  19 -45  26   1 -24  12 -13 -23  10 -16  46 -12  44  32 -48
  25 -22 -38 -10  30  15  10  21 -43  19  -8 -45  -1 -38  33 -31  -1 -27
  -3 -27 -38 -12  -4   5 -44  17  26  11  25 -39  18  34 -13 -23 -45  27
  -1 -39 -37 -33  24  -1   5  30  47  15 -45   8 -14 -14 -35 -28   0 -49
  35  37  46  46 -19 -15   8 -48   9  -6   9 -44  45  27 -29 -41  23 -29
 -24  43  11  13 -35   0  34 -20 -19 -11   0  21 -36 -40  30  16 -10  40
 -13  23  33  32  13 -32  44  14 -13 -17   9   0 -38  14  -7 -47 -35  -4
  26  38  33  41 -27   7  38 -13  43  49 -26  49  16  22 -29 -20 -18 -34
  33  23 -12   4 -49   2 -29 -36  26  19 -15   5   5   8 -28   9 -32 -37
 -34 -30  15  -3  24   0 -21 -33 -27  14   6  -6  26 -24  47  21 -29  41
  39  20 -37  39 -15  17  24  -3  32  37  18 -25   4 -11 -29  38 -13 -31
> run Two 9 3
 -39 -28  32
  -5 -26 -29
  -9  30 -32
   0  18 -10
 -30  49  21
  22  36 -24
 -12  31  16
 -15  -9 -36
   8  32 -17


 */