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

public class Main {
    public class rectangle{
        public int width;
        public int height;
        public  rectangle(){

        }

        public rectangle(int width, int height){
            this.width = width;
            this.height = height;
        }

        public int getWidth() {
            return width;
        }

        public int getHeight() {
            return height;
        }
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        Main main = new Main();
        List<Main.rectangle> rectanglelist = new ArrayList<>();
        while(!input.equals("0 0")){
            String[] dataset = input.split(" ");
            int H = Integer.parseInt(dataset[0]);
            int W = Integer.parseInt(dataset[1]);
            rectanglelist.add(main.new rectangle(W, H));
            input = br.readLine();
        }

        for(int i = 0;i < rectanglelist.size(); i++){
            for(int m = 1; m <= rectanglelist.get(i).height; m++){
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
    }
} 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 import java.util.List; List java.util public class Main {
    public class rectangle{
        public int width;
        public int height;
        public  rectangle(){

        }

        public rectangle(int width, int height){
            this.width = width;
            this.height = height;
        }

        public int getWidth() {
            return width;
        }

        public int getHeight() {
            return height;
        }
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        Main main = new Main();
        List<Main.rectangle> rectanglelist = new ArrayList<>();
        while(!input.equals("0 0")){
            String[] dataset = input.split(" ");
            int H = Integer.parseInt(dataset[0]);
            int W = Integer.parseInt(dataset[1]);
            rectanglelist.add(main.new rectangle(W, H));
            input = br.readLine();
        }

        for(int i = 0;i < rectanglelist.size(); i++){
            for(int m = 1; m <= rectanglelist.get(i).height; m++){
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        Main main = new Main();
        List<Main.rectangle> rectanglelist = new ArrayList<>();
        while(!input.equals("0 0")){
            String[] dataset = input.split(" ");
            int H = Integer.parseInt(dataset[0]);
            int W = Integer.parseInt(dataset[1]);
            rectanglelist.add(main.new rectangle(W, H));
            input = br.readLine();
        }

        for(int i = 0;i < rectanglelist.size(); i++){
            for(int m = 1; m <= rectanglelist.get(i).height; m++){
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        Main main = new Main();
        List<Main.rectangle> rectanglelist = new ArrayList<>();
        while(!input.equals("0 0")){
            String[] dataset = input.split(" ");
            int H = Integer.parseInt(dataset[0]);
            int W = Integer.parseInt(dataset[1]);
            rectanglelist.add(main.new rectangle(W, H));
            input = br.readLine();
        }

        for(int i = 0;i < rectanglelist.size(); i++){
            for(int m = 1; m <= rectanglelist.get(i).height; m++){
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String input = br.readLine(); input br.readLine() br.readLine br Main main = new Main(); main new Main() List<Main.rectangle> rectanglelist = new ArrayList<>(); rectanglelist new ArrayList<>() while(!input.equals("0 0")){
            String[] dataset = input.split(" ");
            int H = Integer.parseInt(dataset[0]);
            int W = Integer.parseInt(dataset[1]);
            rectanglelist.add(main.new rectangle(W, H));
            input = br.readLine();
        } !input.equals("0 0") input.equals("0 0") input.equals input "0 0" {
            String[] dataset = input.split(" ");
            int H = Integer.parseInt(dataset[0]);
            int W = Integer.parseInt(dataset[1]);
            rectanglelist.add(main.new rectangle(W, H));
            input = br.readLine();
        } String[] dataset = input.split(" "); dataset input.split(" ") input.split input " " int H = Integer.parseInt(dataset[0]); H Integer.parseInt(dataset[0]) Integer.parseInt Integer dataset[0] dataset 0 int W = Integer.parseInt(dataset[1]); W Integer.parseInt(dataset[1]) Integer.parseInt Integer dataset[1] dataset 1 rectanglelist.add(main.new rectangle(W, H)) rectanglelist.add rectanglelist main.new rectangle(W, H) main main input = br.readLine() input br.readLine() br.readLine br for(int i = 0;i < rectanglelist.size(); i++){
            for(int m = 1; m <= rectanglelist.get(i).height; m++){
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        } int i = 0; int i = 0; i 0 i < rectanglelist.size() i rectanglelist.size() rectanglelist.size rectanglelist i++ i++ i {
            for(int m = 1; m <= rectanglelist.get(i).height; m++){
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        } {
            for(int m = 1; m <= rectanglelist.get(i).height; m++){
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        } for(int m = 1; m <= rectanglelist.get(i).height; m++){
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            } int m = 1; int m = 1; m 1 m <= rectanglelist.get(i).height m rectanglelist.get(i).height rectanglelist.get(i) rectanglelist.get rectanglelist i rectanglelist.get(i).height m++ m++ m {
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            } {
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            } for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                } int n = 1; int n = 1; n 1 n <= rectanglelist.get(i).width n rectanglelist.get(i).width rectanglelist.get(i) rectanglelist.get rectanglelist i rectanglelist.get(i).width n++ n++ n {
                    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 rectangle{
        public int width;
        public int height;
        public  rectangle(){

        }

        public rectangle(int width, int height){
            this.width = width;
            this.height = height;
        }

        public int getWidth() {
            return width;
        }

        public int getHeight() {
            return height;
        }
    } rectangle public int width; width public int height; height public  rectangle(){

        } rectangle {

        } public rectangle(int width, int height){
            this.width = width;
            this.height = height;
        } rectangle {
            this.width = width;
            this.height = height;
        } this.width = width this.width this this.width width this.height = height this.height this this.height height int width width int height height public int getWidth() {
            return width;
        } getWidth {
            return width;
        } return width; width public int getHeight() {
            return height;
        } getHeight {
            return height;
        } return height; height public class Main {
    public class rectangle{
        public int width;
        public int height;
        public  rectangle(){

        }

        public rectangle(int width, int height){
            this.width = width;
            this.height = height;
        }

        public int getWidth() {
            return width;
        }

        public int getHeight() {
            return height;
        }
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        Main main = new Main();
        List<Main.rectangle> rectanglelist = new ArrayList<>();
        while(!input.equals("0 0")){
            String[] dataset = input.split(" ");
            int H = Integer.parseInt(dataset[0]);
            int W = Integer.parseInt(dataset[1]);
            rectanglelist.add(main.new rectangle(W, H));
            input = br.readLine();
        }

        for(int i = 0;i < rectanglelist.size(); i++){
            for(int m = 1; m <= rectanglelist.get(i).height; m++){
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
    }
} public class Main {
    public class rectangle{
        public int width;
        public int height;
        public  rectangle(){

        }

        public rectangle(int width, int height){
            this.width = width;
            this.height = height;
        }

        public int getWidth() {
            return width;
        }

        public int getHeight() {
            return height;
        }
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        Main main = new Main();
        List<Main.rectangle> rectanglelist = new ArrayList<>();
        while(!input.equals("0 0")){
            String[] dataset = input.split(" ");
            int H = Integer.parseInt(dataset[0]);
            int W = Integer.parseInt(dataset[1]);
            rectanglelist.add(main.new rectangle(W, H));
            input = br.readLine();
        }

        for(int i = 0;i < rectanglelist.size(); i++){
            for(int m = 1; m <= rectanglelist.get(i).height; m++){
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public class rectangle{
        public int width;
        public int height;
        public  rectangle(){

        }

        public rectangle(int width, int height){
            this.width = width;
            this.height = height;
        }

        public int getWidth() {
            return width;
        }

        public int getHeight() {
            return height;
        }
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        Main main = new Main();
        List<Main.rectangle> rectanglelist = new ArrayList<>();
        while(!input.equals("0 0")){
            String[] dataset = input.split(" ");
            int H = Integer.parseInt(dataset[0]);
            int W = Integer.parseInt(dataset[1]);
            rectanglelist.add(main.new rectangle(W, H));
            input = br.readLine();
        }

        for(int i = 0;i < rectanglelist.size(); i++){
            for(int m = 1; m <= rectanglelist.get(i).height; m++){
                for(int n = 1; n <= rectanglelist.get(i).width; n++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
    }
}