Problem:
Print a Rectangle

Draw a rectangle which has a height of H cm and a width of W cm. Draw a 1-cm square by single '#'.

Input

The input consists of multiple datasets. Each dataset consists of two integers H and W separated by a single space.

The input ends with two 0 (when both H and W are zero).

Output

For each dataset, print the rectangle made of H × W '#'.

Print a blank line after each dataset.

Constraints

1 ≤ H ≤ 300

1 ≤ W ≤ 300

Sample Input

3 4
5 6
2 2
0 0

Sample Output

####
####
####

######
######
######
######
######

##
##

Solution in JAVA (judge verdict: Wrong Answer)

import java.util.Scanner;

class Main
{
	public static void main ( String[] args ) {
		Scanner sc = new Scanner ( System.in );

		int n = 0;
		int min = 0;
		int max = 0;
		long sum = 0;

		// n??\???
		n = sc.nextInt ();

		int[] a = new int[ n ];

		// a??\???
		for (int i = 0; i < n; i++ ) {
			a[ i ] = sc.nextInt ();
		}

		// ????¨??????????
		for (int j = 0; j < n; j++ ) {
			sum += a[ j ];
		}

		// ?????§?????\???
		for (int  x = 0; x < n; x++ ) {
			if ( x == 0 ) {
				max = a[ x ];
			} else {
				if ( max < a[ x ] ) {
					max = a[ x ];
				}
			}
		}

		// ????°??????????
		for (int  y = 0; y < n; y++ ) {
			if ( y == 0 ) {
				min = a[ y ];
			} else {
				if ( a[ y ] < min ) {
					min = a[ y ];
				}
			}
		}



		System.out.print ( min + " " + max + " " + sum + "\n" );
	}
}