import java.util.Scanner;
import java.lang.Math;
public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	while (scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int height = Integer.parseInt(inputs[0]);
	    int width = Integer.parseInt(inputs[1]);
	    if (height == 0 && width == 0) {
		break;
	    }
	    for (int i = 0; i < height; i++) {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    }
	    System.out.println();
	}
    }
} import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	while (scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int height = Integer.parseInt(inputs[0]);
	    int width = Integer.parseInt(inputs[1]);
	    if (height == 0 && width == 0) {
		break;
	    }
	    for (int i = 0; i < height; i++) {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    }
	    System.out.println();
	}
    }
} Main public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	while (scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int height = Integer.parseInt(inputs[0]);
	    int width = Integer.parseInt(inputs[1]);
	    if (height == 0 && width == 0) {
		break;
	    }
	    for (int i = 0; i < height; i++) {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    }
	    System.out.println();
	}
    } main {
	Scanner scan = new Scanner(System.in);
	while (scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int height = Integer.parseInt(inputs[0]);
	    int width = Integer.parseInt(inputs[1]);
	    if (height == 0 && width == 0) {
		break;
	    }
	    for (int i = 0; i < height; i++) {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    }
	    System.out.println();
	}
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while (scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int height = Integer.parseInt(inputs[0]);
	    int width = Integer.parseInt(inputs[1]);
	    if (height == 0 && width == 0) {
		break;
	    }
	    for (int i = 0; i < height; i++) {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    }
	    System.out.println();
	} scan.hasNext() scan.hasNext scan {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int height = Integer.parseInt(inputs[0]);
	    int width = Integer.parseInt(inputs[1]);
	    if (height == 0 && width == 0) {
		break;
	    }
	    for (int i = 0; i < height; i++) {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    }
	    System.out.println();
	} String input = scan.nextLine(); input scan.nextLine() scan.nextLine scan String[] inputs = input.split(" "); inputs input.split(" ") input.split input " " int height = Integer.parseInt(inputs[0]); height Integer.parseInt(inputs[0]) Integer.parseInt Integer inputs[0] inputs 0 int width = Integer.parseInt(inputs[1]); width Integer.parseInt(inputs[1]) Integer.parseInt Integer inputs[1] inputs 1 if (height == 0 && width == 0) {
		break;
	    } height == 0 && width == 0 height == 0 height 0 width == 0 width 0 {
		break;
	    } break; for (int i = 0; i < height; i++) {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    } int i = 0; int i = 0; i 0 i < height i height i++ i++ i {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    } {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    } for (int j = 0; j < width; j++) {
		    System.out.print("#");
		} int j = 0; int j = 0; j 0 j < width j width 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 scan = new Scanner(System.in);
	while (scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int height = Integer.parseInt(inputs[0]);
	    int width = Integer.parseInt(inputs[1]);
	    if (height == 0 && width == 0) {
		break;
	    }
	    for (int i = 0; i < height; i++) {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    }
	    System.out.println();
	}
    }
} public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	while (scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int height = Integer.parseInt(inputs[0]);
	    int width = Integer.parseInt(inputs[1]);
	    if (height == 0 && width == 0) {
		break;
	    }
	    for (int i = 0; i < height; i++) {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    }
	    System.out.println();
	}
    }
} Main
import java.util.Scanner;
import java.lang.Math;
public class Main{
    public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	while (scan.hasNext()) {
	    String input = scan.nextLine();
	    String[] inputs = input.split(" ");
	    int height = Integer.parseInt(inputs[0]);
	    int width = Integer.parseInt(inputs[1]);
	    if (height == 0 && width == 0) {
		break;
	    }
	    for (int i = 0; i < height; i++) {
		for (int j = 0; j < width; j++) {
		    System.out.print("#");
		}
		System.out.println();
	    }
	    System.out.println();
	}
    }
}