import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		StringBuilder output = new StringBuilder();
		Scanner scan = new Scanner(System.in);
		while(true) {
			int H = scan.nextInt();
			int W = scan.nextInt();
		
			if (H == 0 && W == 0)
				break;
			
			for (int i = 0; i < H; i++) {
				for (int j = 0; j < W; j++) {
					output.append("#");
				}
				output.append('\n');
			}
			output.append('\n');
		}
		System.out.print(output);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		StringBuilder output = new StringBuilder();
		Scanner scan = new Scanner(System.in);
		while(true) {
			int H = scan.nextInt();
			int W = scan.nextInt();
		
			if (H == 0 && W == 0)
				break;
			
			for (int i = 0; i < H; i++) {
				for (int j = 0; j < W; j++) {
					output.append("#");
				}
				output.append('\n');
			}
			output.append('\n');
		}
		System.out.print(output);
	}

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

} public class Main {
	public static void main(String[] args) {
		StringBuilder output = new StringBuilder();
		Scanner scan = new Scanner(System.in);
		while(true) {
			int H = scan.nextInt();
			int W = scan.nextInt();
		
			if (H == 0 && W == 0)
				break;
			
			for (int i = 0; i < H; i++) {
				for (int j = 0; j < W; j++) {
					output.append("#");
				}
				output.append('\n');
			}
			output.append('\n');
		}
		System.out.print(output);
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		StringBuilder output = new StringBuilder();
		Scanner scan = new Scanner(System.in);
		while(true) {
			int H = scan.nextInt();
			int W = scan.nextInt();
		
			if (H == 0 && W == 0)
				break;
			
			for (int i = 0; i < H; i++) {
				for (int j = 0; j < W; j++) {
					output.append("#");
				}
				output.append('\n');
			}
			output.append('\n');
		}
		System.out.print(output);
	}

}