import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);
		int arr[][] = new int[300][2];
		int i = 0, j = 0, count = 0;
		for (i = 0; i < 300; i++) {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		}
		for (int k = 0; k < count; k++) {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);
		int arr[][] = new int[300][2];
		int i = 0, j = 0, count = 0;
		for (i = 0; i < 300; i++) {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		}
		for (int k = 0; k < count; k++) {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

	}
} Main public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);
		int arr[][] = new int[300][2];
		int i = 0, j = 0, count = 0;
		for (i = 0; i < 300; i++) {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		}
		for (int k = 0; k < count; k++) {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

	} main {
		Scanner stdin = new Scanner(System.in);
		int arr[][] = new int[300][2];
		int i = 0, j = 0, count = 0;
		for (i = 0; i < 300; i++) {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		}
		for (int k = 0; k < count; k++) {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

	} Scanner stdin = new Scanner(System.in); stdin new Scanner(System.in) int arr[][] = new int[300][2]; arr new int[300][2] 300 2 int i = 0 i 0 j = 0 j 0 count = 0; count 0 for (i = 0; i < 300; i++) {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		} i = 0; i = 0 i 0 i < 300 i 300 i++ i++ i {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		} {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		} arr[i][0] = stdin.nextInt() arr[i][0] arr[i] arr i 0 stdin.nextInt() stdin.nextInt stdin arr[i][1] = stdin.nextInt() arr[i][1] arr[i] arr i 1 stdin.nextInt() stdin.nextInt stdin if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			} arr[i][0] == 0 && arr[i][1] == 0 arr[i][0] == 0 arr[i][0] arr[i] arr i 0 0 arr[i][1] == 0 arr[i][1] arr[i] arr i 1 0 {
				count = i;
				break;
			} count = i count i break; for (int k = 0; k < count; k++) {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} int k = 0; int k = 0; k 0 k < count k count k++ k++ k {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} int row = arr[k][0]; row arr[k][0] arr[k] arr k 0 int col = arr[k][1]; col arr[k][1] arr[k] arr k 1 for (i = 0; i < row; i++) {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			} i = 0; i = 0 i 0 i < row i row i++ i++ i {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			} {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			} for (j = 0; j < col; j++) {
					System.out.print("#");
				} j = 0; j = 0 j 0 j < col j col j++ j++ j {
					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.println() System.out.println System.out System System.out String[] args args public class Main {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);
		int arr[][] = new int[300][2];
		int i = 0, j = 0, count = 0;
		for (i = 0; i < 300; i++) {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		}
		for (int k = 0; k < count; k++) {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

	}
} public class Main {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);
		int arr[][] = new int[300][2];
		int i = 0, j = 0, count = 0;
		for (i = 0; i < 300; i++) {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		}
		for (int k = 0; k < count; k++) {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);
		int arr[][] = new int[300][2];
		int i = 0, j = 0, count = 0;
		for (i = 0; i < 300; i++) {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		}
		for (int k = 0; k < count; k++) {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				for (j = 0; j < col; j++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

	}
}