import java.util.*;
public class Print
{
	public static void main (String[] args)
	{
		Scanner scan=new Scanner(System.in);
		System.out.println("How many rows?");
		row=scan.nextInt();
		System.out.println("How many columns?");
		col=scan.nextInt();
		int[row][col] a = new int[][];
		int x, int y;
		Random r=new Random();
		ArrayList w=new ArrayList;
		String str;
		while (x<row)
		{
			while (y<col)
			{
				a[x][y]=r.nextInt(50);
				str+="\t"+a[x][y];
				y++;
			
			}
			w.add(str);
			str=" ";
			x++;
		}
}