import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		while (true) {
			a = sc.nextInt();
			b = sc.nextInt();
			if (a == 0 && b == 0)
				break;
			for (int i = 0; i < a; i++) {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			}
		    System.out.println();
		}
     }
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		while (true) {
			a = sc.nextInt();
			b = sc.nextInt();
			if (a == 0 && b == 0)
				break;
			for (int i = 0; i < a; i++) {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			}
		    System.out.println();
		}
     }
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		while (true) {
			a = sc.nextInt();
			b = sc.nextInt();
			if (a == 0 && b == 0)
				break;
			for (int i = 0; i < a; i++) {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			}
		    System.out.println();
		}
     } main {
		Scanner sc = new Scanner(System.in);
		int a, b;
		while (true) {
			a = sc.nextInt();
			b = sc.nextInt();
			if (a == 0 && b == 0)
				break;
			for (int i = 0; i < a; i++) {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			}
		    System.out.println();
		}
     } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a a b; b while (true) {
			a = sc.nextInt();
			b = sc.nextInt();
			if (a == 0 && b == 0)
				break;
			for (int i = 0; i < a; i++) {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			}
		    System.out.println();
		} true {
			a = sc.nextInt();
			b = sc.nextInt();
			if (a == 0 && b == 0)
				break;
			for (int i = 0; i < a; i++) {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			}
		    System.out.println();
		} a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc if (a == 0 && b == 0)
				break; a == 0 && b == 0 a == 0 a 0 b == 0 b 0 break; for (int i = 0; i < a; i++) {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			} {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			} for (int c = 0; c < b; c++) {
					System.out.printf("#");
				} int c = 0; int c = 0; c 0 c < b c b c++ c++ c {
					System.out.printf("#");
				} {
					System.out.printf("#");
				} System.out.printf("#") System.out.printf System.out System System.out "#" System.out.println() System.out.println System.out System System.out System.out.println() System.out.println System.out System System.out String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		while (true) {
			a = sc.nextInt();
			b = sc.nextInt();
			if (a == 0 && b == 0)
				break;
			for (int i = 0; i < a; i++) {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			}
		    System.out.println();
		}
     }
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		while (true) {
			a = sc.nextInt();
			b = sc.nextInt();
			if (a == 0 && b == 0)
				break;
			for (int i = 0; i < a; i++) {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			}
		    System.out.println();
		}
     }
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		while (true) {
			a = sc.nextInt();
			b = sc.nextInt();
			if (a == 0 && b == 0)
				break;
			for (int i = 0; i < a; i++) {
				for (int c = 0; c < b; c++) {
					System.out.printf("#");
				}
				System.out.println();
			}
		    System.out.println();
		}
     }
}
