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

public class Main {


    public static void main(String[] args) throws IOException {

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

            if (x == 0 && y == 0) {
                break;
            }

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int n = 0; n < x_list.size(); n++) {
            for (int a = 0; a < x_list.get(n); a++) {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                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 public class Main {


    public static void main(String[] args) throws IOException {

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

            if (x == 0 && y == 0) {
                break;
            }

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int n = 0; n < x_list.size(); n++) {
            for (int a = 0; a < x_list.get(n); a++) {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            }

            System.out.println();
        }

    }

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

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

            if (x == 0 && y == 0) {
                break;
            }

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int n = 0; n < x_list.size(); n++) {
            for (int a = 0; a < x_list.get(n); a++) {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            }

            System.out.println();
        }

    } main {

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

            if (x == 0 && y == 0) {
                break;
            }

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int n = 0; n < x_list.size(); n++) {
            for (int a = 0; a < x_list.get(n); a++) {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            }

            System.out.println();
        }

    } ArrayList<Integer> x_list = new ArrayList<>(); x_list new ArrayList<>() ArrayList<Integer> y_list = new ArrayList<>(); y_list new ArrayList<>() int x; x int y; y BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

            if (x == 0 && y == 0) {
                break;
            }

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0); x != 0 || y != 0 x != 0 x 0 y != 0 y 0 {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

            if (x == 0 && y == 0) {
                break;
            }

            x_list.add(x);
            y_list.add(y);

        } String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " x = Integer.parseInt(line[0]) x Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 y = Integer.parseInt(line[1]) y Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 if (x == 0 && y == 0) {
                break;
            } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
                break;
            } break; x_list.add(x) x_list.add x_list x y_list.add(y) y_list.add y_list y for (int n = 0; n < x_list.size(); n++) {
            for (int a = 0; a < x_list.get(n); a++) {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            }

            System.out.println();
        } int n = 0; int n = 0; n 0 n < x_list.size() n x_list.size() x_list.size x_list n++ n++ n {
            for (int a = 0; a < x_list.get(n); a++) {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            }

            System.out.println();
        } {
            for (int a = 0; a < x_list.get(n); a++) {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            }

            System.out.println();
        } for (int a = 0; a < x_list.get(n); a++) {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            } int a = 0; int a = 0; a 0 a < x_list.get(n) a x_list.get(n) x_list.get x_list n a++ a++ a {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            } {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            } for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                } int b = 0; int b = 0; b 0 b < y_list.get(n) b y_list.get(n) y_list.get y_list n b++ b++ b {
                    System.out.printf("#");
                } {
                    System.out.printf("#");
                } System.out.printf("#") System.out.printf 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) throws IOException {

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

            if (x == 0 && y == 0) {
                break;
            }

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int n = 0; n < x_list.size(); n++) {
            for (int a = 0; a < x_list.get(n); a++) {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            }

            System.out.println();
        }

    }

} public class Main {


    public static void main(String[] args) throws IOException {

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

            if (x == 0 && y == 0) {
                break;
            }

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int n = 0; n < x_list.size(); n++) {
            for (int a = 0; a < x_list.get(n); a++) {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            }

            System.out.println();
        }

    }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {


    public static void main(String[] args) throws IOException {

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

            if (x == 0 && y == 0) {
                break;
            }

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int n = 0; n < x_list.size(); n++) {
            for (int a = 0; a < x_list.get(n); a++) {

                for (int b = 0; b < y_list.get(n); b++) {
                    System.out.printf("#");
                }

                System.out.println();
            }

            System.out.println();
        }

    }

}