import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();
		int in = 0;

		while (true) {
			String string = new String();
			string = sc.nextLine();

			if (string.equals("0 0")) {
				break;
			}

			lines.add(string);
			in++;
		}

		for (int i = 0; i < in; i++) {
			int h = 0;
			int w = 0;
			int v = 0;
			String[] str = lines.get(i).split(" ");
			h = Integer.parseInt(str[0]);
			w = Integer.parseInt(str[1]);

			while (h > 0) {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			}
			System.out.println("");
		}
	}

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

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();
		int in = 0;

		while (true) {
			String string = new String();
			string = sc.nextLine();

			if (string.equals("0 0")) {
				break;
			}

			lines.add(string);
			in++;
		}

		for (int i = 0; i < in; i++) {
			int h = 0;
			int w = 0;
			int v = 0;
			String[] str = lines.get(i).split(" ");
			h = Integer.parseInt(str[0]);
			w = Integer.parseInt(str[1]);

			while (h > 0) {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			}
			System.out.println("");
		}
	}

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();
		int in = 0;

		while (true) {
			String string = new String();
			string = sc.nextLine();

			if (string.equals("0 0")) {
				break;
			}

			lines.add(string);
			in++;
		}

		for (int i = 0; i < in; i++) {
			int h = 0;
			int w = 0;
			int v = 0;
			String[] str = lines.get(i).split(" ");
			h = Integer.parseInt(str[0]);
			w = Integer.parseInt(str[1]);

			while (h > 0) {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			}
			System.out.println("");
		}
	} main {
		// TODO ?????????????????????????????????????????????

		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();
		int in = 0;

		while (true) {
			String string = new String();
			string = sc.nextLine();

			if (string.equals("0 0")) {
				break;
			}

			lines.add(string);
			in++;
		}

		for (int i = 0; i < in; i++) {
			int h = 0;
			int w = 0;
			int v = 0;
			String[] str = lines.get(i).split(" ");
			h = Integer.parseInt(str[0]);
			w = Integer.parseInt(str[1]);

			while (h > 0) {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			}
			System.out.println("");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<String> lines = new ArrayList<String>(); lines new ArrayList<String>() int in = 0; in 0 while (true) {
			String string = new String();
			string = sc.nextLine();

			if (string.equals("0 0")) {
				break;
			}

			lines.add(string);
			in++;
		} true {
			String string = new String();
			string = sc.nextLine();

			if (string.equals("0 0")) {
				break;
			}

			lines.add(string);
			in++;
		} String string = new String(); string new String() string = sc.nextLine() string sc.nextLine() sc.nextLine sc if (string.equals("0 0")) {
				break;
			} string.equals("0 0") string.equals string "0 0" {
				break;
			} break; lines.add(string) lines.add lines string in++ in for (int i = 0; i < in; i++) {
			int h = 0;
			int w = 0;
			int v = 0;
			String[] str = lines.get(i).split(" ");
			h = Integer.parseInt(str[0]);
			w = Integer.parseInt(str[1]);

			while (h > 0) {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			}
			System.out.println("");
		} int i = 0; int i = 0; i 0 i < in i in i++ i++ i {
			int h = 0;
			int w = 0;
			int v = 0;
			String[] str = lines.get(i).split(" ");
			h = Integer.parseInt(str[0]);
			w = Integer.parseInt(str[1]);

			while (h > 0) {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			}
			System.out.println("");
		} {
			int h = 0;
			int w = 0;
			int v = 0;
			String[] str = lines.get(i).split(" ");
			h = Integer.parseInt(str[0]);
			w = Integer.parseInt(str[1]);

			while (h > 0) {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			}
			System.out.println("");
		} int h = 0; h 0 int w = 0; w 0 int v = 0; v 0 String[] str = lines.get(i).split(" "); str lines.get(i).split(" ") lines.get(i).split lines.get(i) lines.get lines i " " h = Integer.parseInt(str[0]) h Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 w = Integer.parseInt(str[1]) w Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 while (h > 0) {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			} h > 0 h 0 {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			} v = w v w while (w > 0) {
					System.out.print("#");
					w--;
				} w > 0 w 0 {
					System.out.print("#");
					w--;
				} System.out.print("#") System.out.print System.out System System.out "#" w-- w System.out.println("") System.out.println System.out System System.out "" h-- h w = v w v System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();
		int in = 0;

		while (true) {
			String string = new String();
			string = sc.nextLine();

			if (string.equals("0 0")) {
				break;
			}

			lines.add(string);
			in++;
		}

		for (int i = 0; i < in; i++) {
			int h = 0;
			int w = 0;
			int v = 0;
			String[] str = lines.get(i).split(" ");
			h = Integer.parseInt(str[0]);
			w = Integer.parseInt(str[1]);

			while (h > 0) {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			}
			System.out.println("");
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();
		int in = 0;

		while (true) {
			String string = new String();
			string = sc.nextLine();

			if (string.equals("0 0")) {
				break;
			}

			lines.add(string);
			in++;
		}

		for (int i = 0; i < in; i++) {
			int h = 0;
			int w = 0;
			int v = 0;
			String[] str = lines.get(i).split(" ");
			h = Integer.parseInt(str[0]);
			w = Integer.parseInt(str[1]);

			while (h > 0) {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			}
			System.out.println("");
		}
	}

} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner sc = new Scanner(System.in);

		ArrayList<String> lines = new ArrayList<String>();
		int in = 0;

		while (true) {
			String string = new String();
			string = sc.nextLine();

			if (string.equals("0 0")) {
				break;
			}

			lines.add(string);
			in++;
		}

		for (int i = 0; i < in; i++) {
			int h = 0;
			int w = 0;
			int v = 0;
			String[] str = lines.get(i).split(" ");
			h = Integer.parseInt(str[0]);
			w = Integer.parseInt(str[1]);

			while (h > 0) {
				v = w;
				while (w > 0) {
					System.out.print("#");
					w--;
				}
				System.out.println("");
				h--;
				w = v;
			}
			System.out.println("");
		}
	}

}