import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		int h[] = new int[300];
		int w[] = new int[300];
		int endIndex = 0;
		
		for (int i = 0; i < 300; i++) {
			h[i] = scan.nextInt();
			w[i] = scan.nextInt();

			if (h[i] == 0 && w[i] == 0) {
				endIndex = i;
				break;
			}
		}
		
		for (int i = 0; i < endIndex; i++) {
			for (int height = 0; height < h[i]; height++) {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
		scan.close();
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		int h[] = new int[300];
		int w[] = new int[300];
		int endIndex = 0;
		
		for (int i = 0; i < 300; i++) {
			h[i] = scan.nextInt();
			w[i] = scan.nextInt();

			if (h[i] == 0 && w[i] == 0) {
				endIndex = i;
				break;
			}
		}
		
		for (int i = 0; i < endIndex; i++) {
			for (int height = 0; height < h[i]; height++) {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
		scan.close();
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		int h[] = new int[300];
		int w[] = new int[300];
		int endIndex = 0;
		
		for (int i = 0; i < 300; i++) {
			h[i] = scan.nextInt();
			w[i] = scan.nextInt();

			if (h[i] == 0 && w[i] == 0) {
				endIndex = i;
				break;
			}
		}
		
		for (int i = 0; i < endIndex; i++) {
			for (int height = 0; height < h[i]; height++) {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);		

		int h[] = new int[300];
		int w[] = new int[300];
		int endIndex = 0;
		
		for (int i = 0; i < 300; i++) {
			h[i] = scan.nextInt();
			w[i] = scan.nextInt();

			if (h[i] == 0 && w[i] == 0) {
				endIndex = i;
				break;
			}
		}
		
		for (int i = 0; i < endIndex; i++) {
			for (int height = 0; height < h[i]; height++) {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int h[] = new int[300]; h new int[300] 300 int w[] = new int[300]; w new int[300] 300 int endIndex = 0; endIndex 0 for (int i = 0; i < 300; i++) {
			h[i] = scan.nextInt();
			w[i] = scan.nextInt();

			if (h[i] == 0 && w[i] == 0) {
				endIndex = i;
				break;
			}
		} int i = 0; int i = 0; i 0 i < 300 i 300 i++ i++ i {
			h[i] = scan.nextInt();
			w[i] = scan.nextInt();

			if (h[i] == 0 && w[i] == 0) {
				endIndex = i;
				break;
			}
		} {
			h[i] = scan.nextInt();
			w[i] = scan.nextInt();

			if (h[i] == 0 && w[i] == 0) {
				endIndex = i;
				break;
			}
		} h[i] = scan.nextInt() h[i] h i scan.nextInt() scan.nextInt scan w[i] = scan.nextInt() w[i] w i scan.nextInt() scan.nextInt scan if (h[i] == 0 && w[i] == 0) {
				endIndex = i;
				break;
			} h[i] == 0 && w[i] == 0 h[i] == 0 h[i] h i 0 w[i] == 0 w[i] w i 0 {
				endIndex = i;
				break;
			} endIndex = i endIndex i break; for (int i = 0; i < endIndex; i++) {
			for (int height = 0; height < h[i]; height++) {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} int i = 0; int i = 0; i 0 i < endIndex i endIndex i++ i++ i {
			for (int height = 0; height < h[i]; height++) {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} {
			for (int height = 0; height < h[i]; height++) {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} for (int height = 0; height < h[i]; height++) {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			} int height = 0; int height = 0; height 0 height < h[i] height h[i] h i height++ height++ height {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			} {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			} for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				} int width = 0; int width = 0; width 0 width < w[i] width w[i] w i width++ width++ width {
					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 scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		int h[] = new int[300];
		int w[] = new int[300];
		int endIndex = 0;
		
		for (int i = 0; i < 300; i++) {
			h[i] = scan.nextInt();
			w[i] = scan.nextInt();

			if (h[i] == 0 && w[i] == 0) {
				endIndex = i;
				break;
			}
		}
		
		for (int i = 0; i < endIndex; i++) {
			for (int height = 0; height < h[i]; height++) {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
		scan.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		int h[] = new int[300];
		int w[] = new int[300];
		int endIndex = 0;
		
		for (int i = 0; i < 300; i++) {
			h[i] = scan.nextInt();
			w[i] = scan.nextInt();

			if (h[i] == 0 && w[i] == 0) {
				endIndex = i;
				break;
			}
		}
		
		for (int i = 0; i < endIndex; i++) {
			for (int height = 0; height < h[i]; height++) {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
		scan.close();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		

		int h[] = new int[300];
		int w[] = new int[300];
		int endIndex = 0;
		
		for (int i = 0; i < 300; i++) {
			h[i] = scan.nextInt();
			w[i] = scan.nextInt();

			if (h[i] == 0 && w[i] == 0) {
				endIndex = i;
				break;
			}
		}
		
		for (int i = 0; i < endIndex; i++) {
			for (int height = 0; height < h[i]; height++) {
				for (int width = 0; width < w[i]; width++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
		scan.close();
	}
}