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

public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> wList = new ArrayList<Integer>();
		int H = 0;
		int W = 0;

		while (true) {

			H = input();
			W = input();

			if (H == 0 && W == 0) {

				break;

			} else {

				hList.add(H);
				wList.add(W);

			}
		}

		for (int i = 0; i < hList.size(); i++) {

			for (int j = 1; j <= hList.get(i); j++) {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			}

			System.out.println("");

		}

		close();

	}

	public static int input() {

		return scanner.nextInt();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

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

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> wList = new ArrayList<Integer>();
		int H = 0;
		int W = 0;

		while (true) {

			H = input();
			W = input();

			if (H == 0 && W == 0) {

				break;

			} else {

				hList.add(H);
				wList.add(W);

			}
		}

		for (int i = 0; i < hList.size(); i++) {

			for (int j = 1; j <= hList.get(i); j++) {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			}

			System.out.println("");

		}

		close();

	}

	public static int input() {

		return scanner.nextInt();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

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

		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> wList = new ArrayList<Integer>();
		int H = 0;
		int W = 0;

		while (true) {

			H = input();
			W = input();

			if (H == 0 && W == 0) {

				break;

			} else {

				hList.add(H);
				wList.add(W);

			}
		}

		for (int i = 0; i < hList.size(); i++) {

			for (int j = 1; j <= hList.get(i); j++) {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			}

			System.out.println("");

		}

		close();

	} main {

		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> wList = new ArrayList<Integer>();
		int H = 0;
		int W = 0;

		while (true) {

			H = input();
			W = input();

			if (H == 0 && W == 0) {

				break;

			} else {

				hList.add(H);
				wList.add(W);

			}
		}

		for (int i = 0; i < hList.size(); i++) {

			for (int j = 1; j <= hList.get(i); j++) {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			}

			System.out.println("");

		}

		close();

	} ArrayList<Integer> hList = new ArrayList<Integer>(); hList new ArrayList<Integer>() ArrayList<Integer> wList = new ArrayList<Integer>(); wList new ArrayList<Integer>() int H = 0; H 0 int W = 0; W 0 while (true) {

			H = input();
			W = input();

			if (H == 0 && W == 0) {

				break;

			} else {

				hList.add(H);
				wList.add(W);

			}
		} true {

			H = input();
			W = input();

			if (H == 0 && W == 0) {

				break;

			} else {

				hList.add(H);
				wList.add(W);

			}
		} H = input() H input() input W = input() W input() input if (H == 0 && W == 0) {

				break;

			} else {

				hList.add(H);
				wList.add(W);

			} H == 0 && W == 0 H == 0 H 0 W == 0 W 0 {

				break;

			} break; {

				hList.add(H);
				wList.add(W);

			} hList.add(H) hList.add hList H wList.add(W) wList.add wList W for (int i = 0; i < hList.size(); i++) {

			for (int j = 1; j <= hList.get(i); j++) {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			}

			System.out.println("");

		} int i = 0; int i = 0; i 0 i < hList.size() i hList.size() hList.size hList i++ i++ i {

			for (int j = 1; j <= hList.get(i); j++) {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			}

			System.out.println("");

		} {

			for (int j = 1; j <= hList.get(i); j++) {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			}

			System.out.println("");

		} for (int j = 1; j <= hList.get(i); j++) {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			} int j = 1; int j = 1; j 1 j <= hList.get(i) j hList.get(i) hList.get hList i j++ j++ j {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			} {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			} for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				} int k = 1; int k = 1; k 1 k <=wList.get(i) k wList.get(i) wList.get wList i k++ k++ k {

					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 "" close() close String[] args args public static int input() {

		return scanner.nextInt();

	} input {

		return scanner.nextInt();

	} return scanner.nextInt(); scanner.nextInt() scanner.nextInt scanner public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	} close {

		if (scanner != null) {

			scanner.close();

		}
	} if (scanner != null) {

			scanner.close();

		} scanner != null scanner null {

			scanner.close();

		} scanner.close() scanner.close scanner public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> wList = new ArrayList<Integer>();
		int H = 0;
		int W = 0;

		while (true) {

			H = input();
			W = input();

			if (H == 0 && W == 0) {

				break;

			} else {

				hList.add(H);
				wList.add(W);

			}
		}

		for (int i = 0; i < hList.size(); i++) {

			for (int j = 1; j <= hList.get(i); j++) {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			}

			System.out.println("");

		}

		close();

	}

	public static int input() {

		return scanner.nextInt();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> wList = new ArrayList<Integer>();
		int H = 0;
		int W = 0;

		while (true) {

			H = input();
			W = input();

			if (H == 0 && W == 0) {

				break;

			} else {

				hList.add(H);
				wList.add(W);

			}
		}

		for (int i = 0; i < hList.size(); i++) {

			for (int j = 1; j <= hList.get(i); j++) {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			}

			System.out.println("");

		}

		close();

	}

	public static int input() {

		return scanner.nextInt();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

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

public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> wList = new ArrayList<Integer>();
		int H = 0;
		int W = 0;

		while (true) {

			H = input();
			W = input();

			if (H == 0 && W == 0) {

				break;

			} else {

				hList.add(H);
				wList.add(W);

			}
		}

		for (int i = 0; i < hList.size(); i++) {

			for (int j = 1; j <= hList.get(i); j++) {

				for (int k = 1; k <=wList.get(i) ; k++) {

					System.out.print("#");

				}

				System.out.println("");

			}

			System.out.println("");

		}

		close();

	}

	public static int input() {

		return scanner.nextInt();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
}