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

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

		Scanner scanner = new Scanner(System.in);

		boolean flg = true;

		ArrayList<Integer> weightList = new ArrayList<Integer>();
		ArrayList<Integer> heightList = new ArrayList<Integer>();

		while (flg) {
			scanner.hasNext();
			int h = scanner.nextInt();
			int w = scanner.nextInt();

			if ((h == 0) && (w == 0)) {
				flg = false;
				break;
			}

			// Integer????????°??????????????????
			weightList.add(Integer.valueOf(w));
			heightList.add(Integer.valueOf(h));
		}

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

			for(int k = 0; k<heightList.get(i); k++){
				for(int j=0; j<weightList.get(i); j++){
					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) {

		Scanner scanner = new Scanner(System.in);

		boolean flg = true;

		ArrayList<Integer> weightList = new ArrayList<Integer>();
		ArrayList<Integer> heightList = new ArrayList<Integer>();

		while (flg) {
			scanner.hasNext();
			int h = scanner.nextInt();
			int w = scanner.nextInt();

			if ((h == 0) && (w == 0)) {
				flg = false;
				break;
			}

			// Integer????????°??????????????????
			weightList.add(Integer.valueOf(w));
			heightList.add(Integer.valueOf(h));
		}

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

			for(int k = 0; k<heightList.get(i); k++){
				for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

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

		Scanner scanner = new Scanner(System.in);

		boolean flg = true;

		ArrayList<Integer> weightList = new ArrayList<Integer>();
		ArrayList<Integer> heightList = new ArrayList<Integer>();

		while (flg) {
			scanner.hasNext();
			int h = scanner.nextInt();
			int w = scanner.nextInt();

			if ((h == 0) && (w == 0)) {
				flg = false;
				break;
			}

			// Integer????????°??????????????????
			weightList.add(Integer.valueOf(w));
			heightList.add(Integer.valueOf(h));
		}

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

			for(int k = 0; k<heightList.get(i); k++){
				for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

	} main {

		Scanner scanner = new Scanner(System.in);

		boolean flg = true;

		ArrayList<Integer> weightList = new ArrayList<Integer>();
		ArrayList<Integer> heightList = new ArrayList<Integer>();

		while (flg) {
			scanner.hasNext();
			int h = scanner.nextInt();
			int w = scanner.nextInt();

			if ((h == 0) && (w == 0)) {
				flg = false;
				break;
			}

			// Integer????????°??????????????????
			weightList.add(Integer.valueOf(w));
			heightList.add(Integer.valueOf(h));
		}

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

			for(int k = 0; k<heightList.get(i); k++){
				for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) boolean flg = true; flg true ArrayList<Integer> weightList = new ArrayList<Integer>(); weightList new ArrayList<Integer>() ArrayList<Integer> heightList = new ArrayList<Integer>(); heightList new ArrayList<Integer>() while (flg) {
			scanner.hasNext();
			int h = scanner.nextInt();
			int w = scanner.nextInt();

			if ((h == 0) && (w == 0)) {
				flg = false;
				break;
			}

			// Integer????????°??????????????????
			weightList.add(Integer.valueOf(w));
			heightList.add(Integer.valueOf(h));
		} flg {
			scanner.hasNext();
			int h = scanner.nextInt();
			int w = scanner.nextInt();

			if ((h == 0) && (w == 0)) {
				flg = false;
				break;
			}

			// Integer????????°??????????????????
			weightList.add(Integer.valueOf(w));
			heightList.add(Integer.valueOf(h));
		} scanner.hasNext() scanner.hasNext scanner int h = scanner.nextInt(); h scanner.nextInt() scanner.nextInt scanner int w = scanner.nextInt(); w scanner.nextInt() scanner.nextInt scanner if ((h == 0) && (w == 0)) {
				flg = false;
				break;
			} (h == 0) && (w == 0) (h == 0) h 0 (w == 0) w 0 {
				flg = false;
				break;
			} flg = false flg false break; weightList.add(Integer.valueOf(w)) weightList.add weightList Integer.valueOf(w) Integer.valueOf Integer w heightList.add(Integer.valueOf(h)) heightList.add heightList Integer.valueOf(h) Integer.valueOf Integer h for(int i=0; i<weightList.size(); i++){

			for(int k = 0; k<heightList.get(i); k++){
				for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} int i=0; int i=0; i 0 i<weightList.size() i weightList.size() weightList.size weightList i++ i++ i {

			for(int k = 0; k<heightList.get(i); k++){
				for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} {

			for(int k = 0; k<heightList.get(i); k++){
				for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} for(int k = 0; k<heightList.get(i); k++){
				for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				}
				System.out.println();
			} int k = 0; int k = 0; k 0 k<heightList.get(i) k heightList.get(i) heightList.get heightList i k++ k++ k {
				for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				}
				System.out.println();
			} {
				for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				}
				System.out.println();
			} for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				} int j=0; int j=0; j 0 j<weightList.get(i) j weightList.get(i) weightList.get weightList i j++ j++ j {
					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) {

		Scanner scanner = new Scanner(System.in);

		boolean flg = true;

		ArrayList<Integer> weightList = new ArrayList<Integer>();
		ArrayList<Integer> heightList = new ArrayList<Integer>();

		while (flg) {
			scanner.hasNext();
			int h = scanner.nextInt();
			int w = scanner.nextInt();

			if ((h == 0) && (w == 0)) {
				flg = false;
				break;
			}

			// Integer????????°??????????????????
			weightList.add(Integer.valueOf(w));
			heightList.add(Integer.valueOf(h));
		}

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

			for(int k = 0; k<heightList.get(i); k++){
				for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

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

		Scanner scanner = new Scanner(System.in);

		boolean flg = true;

		ArrayList<Integer> weightList = new ArrayList<Integer>();
		ArrayList<Integer> heightList = new ArrayList<Integer>();

		while (flg) {
			scanner.hasNext();
			int h = scanner.nextInt();
			int w = scanner.nextInt();

			if ((h == 0) && (w == 0)) {
				flg = false;
				break;
			}

			// Integer????????°??????????????????
			weightList.add(Integer.valueOf(w));
			heightList.add(Integer.valueOf(h));
		}

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

			for(int k = 0; k<heightList.get(i); k++){
				for(int j=0; j<weightList.get(i); j++){
					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) {

		Scanner scanner = new Scanner(System.in);

		boolean flg = true;

		ArrayList<Integer> weightList = new ArrayList<Integer>();
		ArrayList<Integer> heightList = new ArrayList<Integer>();

		while (flg) {
			scanner.hasNext();
			int h = scanner.nextInt();
			int w = scanner.nextInt();

			if ((h == 0) && (w == 0)) {
				flg = false;
				break;
			}

			// Integer????????°??????????????????
			weightList.add(Integer.valueOf(w));
			heightList.add(Integer.valueOf(h));
		}

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

			for(int k = 0; k<heightList.get(i); k++){
				for(int j=0; j<weightList.get(i); j++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}

	}
}