
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		// Scanner scanner = new Scanner("3 5 4 2 0 0 8 8");
		Scanner scanner = new Scanner(System.in);
		int a;
		int b;
		while (true) {
			a = scanner.nextInt();
			b = scanner.nextInt();
			if (a == 0 && b == 0) {
				break;
			}
			for (int i = 0; i < a; i++) {
				lineMaker(b);
				System.out.println("");
			}
			System.out.println("");
		}
	}

	static void lineMaker(int b) {
		for (int i = 0; i < b; i++) {
			System.out.print("#");
		}
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		// Scanner scanner = new Scanner("3 5 4 2 0 0 8 8");
		Scanner scanner = new Scanner(System.in);
		int a;
		int b;
		while (true) {
			a = scanner.nextInt();
			b = scanner.nextInt();
			if (a == 0 && b == 0) {
				break;
			}
			for (int i = 0; i < a; i++) {
				lineMaker(b);
				System.out.println("");
			}
			System.out.println("");
		}
	}

	static void lineMaker(int b) {
		for (int i = 0; i < b; i++) {
			System.out.print("#");
		}
	}
} Main public static void main(String[] args) {
		// Scanner scanner = new Scanner("3 5 4 2 0 0 8 8");
		Scanner scanner = new Scanner(System.in);
		int a;
		int b;
		while (true) {
			a = scanner.nextInt();
			b = scanner.nextInt();
			if (a == 0 && b == 0) {
				break;
			}
			for (int i = 0; i < a; i++) {
				lineMaker(b);
				System.out.println("");
			}
			System.out.println("");
		}
	} main {
		// Scanner scanner = new Scanner("3 5 4 2 0 0 8 8");
		Scanner scanner = new Scanner(System.in);
		int a;
		int b;
		while (true) {
			a = scanner.nextInt();
			b = scanner.nextInt();
			if (a == 0 && b == 0) {
				break;
			}
			for (int i = 0; i < a; i++) {
				lineMaker(b);
				System.out.println("");
			}
			System.out.println("");
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a; a int b; b while (true) {
			a = scanner.nextInt();
			b = scanner.nextInt();
			if (a == 0 && b == 0) {
				break;
			}
			for (int i = 0; i < a; i++) {
				lineMaker(b);
				System.out.println("");
			}
			System.out.println("");
		} true {
			a = scanner.nextInt();
			b = scanner.nextInt();
			if (a == 0 && b == 0) {
				break;
			}
			for (int i = 0; i < a; i++) {
				lineMaker(b);
				System.out.println("");
			}
			System.out.println("");
		} a = scanner.nextInt() a scanner.nextInt() scanner.nextInt scanner b = scanner.nextInt() b scanner.nextInt() scanner.nextInt scanner if (a == 0 && b == 0) {
				break;
			} a == 0 && b == 0 a == 0 a 0 b == 0 b 0 {
				break;
			} break; for (int i = 0; i < a; i++) {
				lineMaker(b);
				System.out.println("");
			} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
				lineMaker(b);
				System.out.println("");
			} {
				lineMaker(b);
				System.out.println("");
			} lineMaker(b) lineMaker b 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 static void lineMaker(int b) {
		for (int i = 0; i < b; i++) {
			System.out.print("#");
		}
	} lineMaker {
		for (int i = 0; i < b; i++) {
			System.out.print("#");
		}
	} for (int i = 0; i < b; i++) {
			System.out.print("#");
		} int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
			System.out.print("#");
		} {
			System.out.print("#");
		} System.out.print("#") System.out.print System.out System System.out "#" int b b

import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		// Scanner scanner = new Scanner("3 5 4 2 0 0 8 8");
		Scanner scanner = new Scanner(System.in);
		int a;
		int b;
		while (true) {
			a = scanner.nextInt();
			b = scanner.nextInt();
			if (a == 0 && b == 0) {
				break;
			}
			for (int i = 0; i < a; i++) {
				lineMaker(b);
				System.out.println("");
			}
			System.out.println("");
		}
	}

	static void lineMaker(int b) {
		for (int i = 0; i < b; i++) {
			System.out.print("#");
		}
	}
}