import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int H = scan.nextInt();
			int W = scan.nextInt();

			if(H == 0 && W == 0){
				break;
			}
			for(int i = 0; i < H; i++){
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			}
			System.out.println();
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int H = scan.nextInt();
			int W = scan.nextInt();

			if(H == 0 && W == 0){
				break;
			}
			for(int i = 0; i < H; i++){
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			}
			System.out.println();
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int H = scan.nextInt();
			int W = scan.nextInt();

			if(H == 0 && W == 0){
				break;
			}
			for(int i = 0; i < H; i++){
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			}
			System.out.println();
		}
	} main {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int H = scan.nextInt();
			int W = scan.nextInt();

			if(H == 0 && W == 0){
				break;
			}
			for(int i = 0; i < H; i++){
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			}
			System.out.println();
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()){
			int H = scan.nextInt();
			int W = scan.nextInt();

			if(H == 0 && W == 0){
				break;
			}
			for(int i = 0; i < H; i++){
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			}
			System.out.println();
		} scan.hasNext() scan.hasNext scan {
			int H = scan.nextInt();
			int W = scan.nextInt();

			if(H == 0 && W == 0){
				break;
			}
			for(int i = 0; i < H; i++){
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			}
			System.out.println();
		} 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){
				break;
			} H == 0 && W == 0 H == 0 H 0 W == 0 W 0 {
				break;
			} break; for(int i = 0; i < H; i++){
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			} int i = 0; int i = 0; i 0 i < H i H i++ i++ i {
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			} {
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			} String str = ""; str "" for(int j = 0; j < W; j++){
					str += "#";
				} int j = 0; int j = 0; j 0 j < W j W j++ j++ j {
					str += "#";
				} {
					str += "#";
				} str += "#" str "#" System.out.println(str) System.out.println System.out System System.out str System.out.println() System.out.println System.out System System.out String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int H = scan.nextInt();
			int W = scan.nextInt();

			if(H == 0 && W == 0){
				break;
			}
			for(int i = 0; i < H; i++){
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			}
			System.out.println();
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int H = scan.nextInt();
			int W = scan.nextInt();

			if(H == 0 && W == 0){
				break;
			}
			for(int i = 0; i < H; i++){
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			}
			System.out.println();
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int H = scan.nextInt();
			int W = scan.nextInt();

			if(H == 0 && W == 0){
				break;
			}
			for(int i = 0; i < H; i++){
				String str = "";
				for(int j = 0; j < W; j++){
					str += "#";
				}
				System.out.println(str);
			}
			System.out.println();
		}
	}
}