import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) {

		//?????£?????????
		int numH = 0;
		int numW = 0;

		String sel = "#";

		String[] NumWork;

		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				String line = br.readLine();

				if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				}

			}
		} catch (IOException e) {
			System.out.println(e);
		}

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util public class Main {

	public static void main(String[] args) {

		//?????£?????????
		int numH = 0;
		int numW = 0;

		String sel = "#";

		String[] NumWork;

		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				String line = br.readLine();

				if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				}

			}
		} catch (IOException e) {
			System.out.println(e);
		}

	}

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

		//?????£?????????
		int numH = 0;
		int numW = 0;

		String sel = "#";

		String[] NumWork;

		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				String line = br.readLine();

				if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				}

			}
		} catch (IOException e) {
			System.out.println(e);
		}

	} main {

		//?????£?????????
		int numH = 0;
		int numW = 0;

		String sel = "#";

		String[] NumWork;

		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				String line = br.readLine();

				if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				}

			}
		} catch (IOException e) {
			System.out.println(e);
		}

	} int numH = 0; numH 0 int numW = 0; numW 0 String sel = "#"; sel "#" String[] NumWork; NumWork try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				String line = br.readLine();

				if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				}

			}
		} catch (IOException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		} IOException e {
			System.out.println(e);
		} System.out.println(e) System.out.println System.out System System.out e {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				String line = br.readLine();

				if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				}

			}
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while (true) {
				String line = br.readLine();

				if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				}

			} true {
				String line = br.readLine();

				if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				}

			} String line = br.readLine(); line br.readLine() br.readLine br if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				} line != null line null {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				} NumWork = line.split(" ", 0) NumWork line.split(" ", 0) line.split line " " 0 ArrayList<Integer> NumList = new ArrayList<Integer>(); NumList new ArrayList<Integer>() for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					} int i = 0; int i = 0; i 0 i < NumWork.length i NumWork.length NumWork NumWork.length i++ i++ i {
						NumList.add(Integer.parseInt(NumWork[i]));
					} {
						NumList.add(Integer.parseInt(NumWork[i]));
					} NumList.add(Integer.parseInt(NumWork[i])) NumList.add NumList Integer.parseInt(NumWork[i]) Integer.parseInt Integer NumWork[i] NumWork i numH = NumList.get(0) numH NumList.get(0) NumList.get NumList 0 numW = NumList.get(1) numW NumList.get(1) NumList.get NumList 1 if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					} numH != 0 || numW != 0 numH != 0 numH 0 numW != 0 numW 0 {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					} for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						} int i = 0; int i = 0; i 0 i < numH i numH i++ i++ i {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						} {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						} for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							} int j = 0; int j = 0; j 0 j < numW j numW j++ j++ j {
								System.out.print(sel);
							} {
								System.out.print(sel);
							} System.out.print(sel) System.out.print System.out System System.out sel System.out.println("") System.out.println System.out System System.out "" System.out.println("") System.out.println System.out System System.out "" {
						break;
					} break; {
					break;
				} break; String[] args args public class Main {

	public static void main(String[] args) {

		//?????£?????????
		int numH = 0;
		int numW = 0;

		String sel = "#";

		String[] NumWork;

		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				String line = br.readLine();

				if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				}

			}
		} catch (IOException e) {
			System.out.println(e);
		}

	}

} public class Main {

	public static void main(String[] args) {

		//?????£?????????
		int numH = 0;
		int numW = 0;

		String sel = "#";

		String[] NumWork;

		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				String line = br.readLine();

				if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				}

			}
		} catch (IOException e) {
			System.out.println(e);
		}

	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) {

		//?????£?????????
		int numH = 0;
		int numW = 0;

		String sel = "#";

		String[] NumWork;

		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				String line = br.readLine();

				if (line != null) {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					ArrayList<Integer> NumList = new ArrayList<Integer>();

					for (int i = 0; i < NumWork.length; i++) {
						NumList.add(Integer.parseInt(NumWork[i]));
					}
					numH = NumList.get(0);
					numW = NumList.get(1);

					//????????¢?????????
					//????????????
					if (numH != 0 || numW != 0) {

						for (int i = 0; i < numH; i++) {
							//
							for (int j = 0; j < numW; j++) {
								System.out.print(sel);
							}
							System.out.println("");
						}
						System.out.println("");
					}else{
						break;
					}
				}else{
					break;
				}

			}
		} catch (IOException e) {
			System.out.println(e);
		}

	}

}