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

public class Main {

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


		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();

		Integer[] ary;

		while(scan.hasNext()){

			ary = new Integer[2];
			//???H
			ary[0] = scan.nextInt();
			//?¨?W
			ary[1] = scan.nextInt();

			if(ary[0] != 0 && ary[1] != 0){

				list.add(ary);
			}else{
				scan.close();
				break;
			}

		}

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

			ary = list.get(i);
			//???
			for(int j = 0; j < ary[0]; j++){

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			}
			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 scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();

		Integer[] ary;

		while(scan.hasNext()){

			ary = new Integer[2];
			//???H
			ary[0] = scan.nextInt();
			//?¨?W
			ary[1] = scan.nextInt();

			if(ary[0] != 0 && ary[1] != 0){

				list.add(ary);
			}else{
				scan.close();
				break;
			}

		}

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

			ary = list.get(i);
			//???
			for(int j = 0; j < ary[0]; j++){

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
		}
	}
} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????


		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();

		Integer[] ary;

		while(scan.hasNext()){

			ary = new Integer[2];
			//???H
			ary[0] = scan.nextInt();
			//?¨?W
			ary[1] = scan.nextInt();

			if(ary[0] != 0 && ary[1] != 0){

				list.add(ary);
			}else{
				scan.close();
				break;
			}

		}

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

			ary = list.get(i);
			//???
			for(int j = 0; j < ary[0]; j++){

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
		}
	} main {
		// TODO ?????????????????????????????????????????????


		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();

		Integer[] ary;

		while(scan.hasNext()){

			ary = new Integer[2];
			//???H
			ary[0] = scan.nextInt();
			//?¨?W
			ary[1] = scan.nextInt();

			if(ary[0] != 0 && ary[1] != 0){

				list.add(ary);
			}else{
				scan.close();
				break;
			}

		}

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

			ary = list.get(i);
			//???
			for(int j = 0; j < ary[0]; j++){

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) ArrayList<Integer[]> list = new ArrayList<Integer[]>(); list new ArrayList<Integer[]>() Integer[] ary; ary while(scan.hasNext()){

			ary = new Integer[2];
			//???H
			ary[0] = scan.nextInt();
			//?¨?W
			ary[1] = scan.nextInt();

			if(ary[0] != 0 && ary[1] != 0){

				list.add(ary);
			}else{
				scan.close();
				break;
			}

		} scan.hasNext() scan.hasNext scan {

			ary = new Integer[2];
			//???H
			ary[0] = scan.nextInt();
			//?¨?W
			ary[1] = scan.nextInt();

			if(ary[0] != 0 && ary[1] != 0){

				list.add(ary);
			}else{
				scan.close();
				break;
			}

		} ary = new Integer[2] ary new Integer[2] 2 ary[0] = scan.nextInt() ary[0] ary 0 scan.nextInt() scan.nextInt scan ary[1] = scan.nextInt() ary[1] ary 1 scan.nextInt() scan.nextInt scan if(ary[0] != 0 && ary[1] != 0){

				list.add(ary);
			}else{
				scan.close();
				break;
			} ary[0] != 0 && ary[1] != 0 ary[0] != 0 ary[0] ary 0 0 ary[1] != 0 ary[1] ary 1 0 {

				list.add(ary);
			} list.add(ary) list.add list ary {
				scan.close();
				break;
			} scan.close() scan.close scan break; for(int i = 0; i < list.size(); i++){

			ary = list.get(i);
			//???
			for(int j = 0; j < ary[0]; j++){

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
		} int i = 0; int i = 0; i 0 i < list.size() i list.size() list.size list i++ i++ i {

			ary = list.get(i);
			//???
			for(int j = 0; j < ary[0]; j++){

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
		} {

			ary = list.get(i);
			//???
			for(int j = 0; j < ary[0]; j++){

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
		} ary = list.get(i) ary list.get(i) list.get list i for(int j = 0; j < ary[0]; j++){

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			} int j = 0; int j = 0; j 0 j < ary[0] j ary[0] ary 0 j++ j++ j {

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			} {

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			} for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				} int k = 0; int k = 0; k 0 k < ary[1] k ary[1] ary 1 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 "" String[] args args public class Main {

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


		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();

		Integer[] ary;

		while(scan.hasNext()){

			ary = new Integer[2];
			//???H
			ary[0] = scan.nextInt();
			//?¨?W
			ary[1] = scan.nextInt();

			if(ary[0] != 0 && ary[1] != 0){

				list.add(ary);
			}else{
				scan.close();
				break;
			}

		}

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

			ary = list.get(i);
			//???
			for(int j = 0; j < ary[0]; j++){

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
		}
	}
} public class Main {

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


		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();

		Integer[] ary;

		while(scan.hasNext()){

			ary = new Integer[2];
			//???H
			ary[0] = scan.nextInt();
			//?¨?W
			ary[1] = scan.nextInt();

			if(ary[0] != 0 && ary[1] != 0){

				list.add(ary);
			}else{
				scan.close();
				break;
			}

		}

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

			ary = list.get(i);
			//???
			for(int j = 0; j < ary[0]; j++){

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
		}
	}
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

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


		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();

		Integer[] ary;

		while(scan.hasNext()){

			ary = new Integer[2];
			//???H
			ary[0] = scan.nextInt();
			//?¨?W
			ary[1] = scan.nextInt();

			if(ary[0] != 0 && ary[1] != 0){

				list.add(ary);
			}else{
				scan.close();
				break;
			}

		}

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

			ary = list.get(i);
			//???
			for(int j = 0; j < ary[0]; j++){

				//?¨?
				for(int k = 0; k < ary[1]; k++){

					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
		}
	}
}