import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		for(;;){
			int H = scan.nextInt();
			int W = scan.nextInt();
			if(H == 0 && W == 0){
				scan.close();
				break;
			}
			for(int i=0; i<H; i++){

				for(int s=0; s<W; s++){
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.print("\n");
		}
	}
} import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		for(;;){
			int H = scan.nextInt();
			int W = scan.nextInt();
			if(H == 0 && W == 0){
				scan.close();
				break;
			}
			for(int i=0; i<H; i++){

				for(int s=0; s<W; s++){
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.print("\n");
		}
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		for(;;){
			int H = scan.nextInt();
			int W = scan.nextInt();
			if(H == 0 && W == 0){
				scan.close();
				break;
			}
			for(int i=0; i<H; i++){

				for(int s=0; s<W; s++){
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.print("\n");
		}
	} main {

		Scanner scan = new Scanner(System.in);

		for(;;){
			int H = scan.nextInt();
			int W = scan.nextInt();
			if(H == 0 && W == 0){
				scan.close();
				break;
			}
			for(int i=0; i<H; i++){

				for(int s=0; s<W; s++){
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.print("\n");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) for(;;){
			int H = scan.nextInt();
			int W = scan.nextInt();
			if(H == 0 && W == 0){
				scan.close();
				break;
			}
			for(int i=0; i<H; i++){

				for(int s=0; s<W; s++){
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.print("\n");
		} ; {
			int H = scan.nextInt();
			int W = scan.nextInt();
			if(H == 0 && W == 0){
				scan.close();
				break;
			}
			for(int i=0; i<H; i++){

				for(int s=0; s<W; s++){
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.print("\n");
		} {
			int H = scan.nextInt();
			int W = scan.nextInt();
			if(H == 0 && W == 0){
				scan.close();
				break;
			}
			for(int i=0; i<H; i++){

				for(int s=0; s<W; s++){
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.print("\n");
		} int H = scan.nextInt(); H scan.nextInt() scan.nextInt scan int W = scan.nextInt(); W scan.nextInt() scan.nextInt scan if(H == 0 && W == 0){
				scan.close();
				break;
			} H == 0 && W == 0 H == 0 H 0 W == 0 W 0 {
				scan.close();
				break;
			} scan.close() scan.close scan break; for(int i=0; i<H; i++){

				for(int s=0; s<W; s++){
					System.out.print("#");
				}
				System.out.println("");
			} int i=0; int i=0; i 0 i<H i H i++ i++ i {

				for(int s=0; s<W; s++){
					System.out.print("#");
				}
				System.out.println("");
			} {

				for(int s=0; s<W; s++){
					System.out.print("#");
				}
				System.out.println("");
			} for(int s=0; s<W; s++){
					System.out.print("#");
				} int s=0; int s=0; s 0 s<W s W s++ s++ s {
					System.out.print("#");
				} {
					System.out.print("#");
				} System.out.print("#") System.out.print System.out System System.out "#" System.out.println("") System.out.println System.out System System.out "" System.out.print("\n") System.out.print System.out System System.out "\n" String[] args args
import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		for(;;){
			int H = scan.nextInt();
			int W = scan.nextInt();
			if(H == 0 && W == 0){
				scan.close();
				break;
			}
			for(int i=0; i<H; i++){

				for(int s=0; s<W; s++){
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.print("\n");
		}
	}
}