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

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in));
        StringBuilder strb = new StringBuilder();
        String[] data;
        int h = 0;
        int w = 0;
        while (true) {
            data = br.readLine().split(" ");
            h = Integer.parseInt(data[0]);
            w = Integer.parseInt(data[1]);
            if (h == 0 && w == 0) {
                break;
            }
            for (int i = 0; i < h; i++) {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            }
            strb.append("\n");
        }
        System.out.print(strb);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in));
        StringBuilder strb = new StringBuilder();
        String[] data;
        int h = 0;
        int w = 0;
        while (true) {
            data = br.readLine().split(" ");
            h = Integer.parseInt(data[0]);
            w = Integer.parseInt(data[1]);
            if (h == 0 && w == 0) {
                break;
            }
            for (int i = 0; i < h; i++) {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            }
            strb.append("\n");
        }
        System.out.print(strb);
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in));
        StringBuilder strb = new StringBuilder();
        String[] data;
        int h = 0;
        int w = 0;
        while (true) {
            data = br.readLine().split(" ");
            h = Integer.parseInt(data[0]);
            w = Integer.parseInt(data[1]);
            if (h == 0 && w == 0) {
                break;
            }
            for (int i = 0; i < h; i++) {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            }
            strb.append("\n");
        }
        System.out.print(strb);
    } main {
        BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in));
        StringBuilder strb = new StringBuilder();
        String[] data;
        int h = 0;
        int w = 0;
        while (true) {
            data = br.readLine().split(" ");
            h = Integer.parseInt(data[0]);
            w = Integer.parseInt(data[1]);
            if (h == 0 && w == 0) {
                break;
            }
            for (int i = 0; i < h; i++) {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            }
            strb.append("\n");
        }
        System.out.print(strb);
    } BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in)); br new BufferedReader(
            new InputStreamReader(System.in)) StringBuilder strb = new StringBuilder(); strb new StringBuilder() String[] data; data int h = 0; h 0 int w = 0; w 0 while (true) {
            data = br.readLine().split(" ");
            h = Integer.parseInt(data[0]);
            w = Integer.parseInt(data[1]);
            if (h == 0 && w == 0) {
                break;
            }
            for (int i = 0; i < h; i++) {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            }
            strb.append("\n");
        } true {
            data = br.readLine().split(" ");
            h = Integer.parseInt(data[0]);
            w = Integer.parseInt(data[1]);
            if (h == 0 && w == 0) {
                break;
            }
            for (int i = 0; i < h; i++) {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            }
            strb.append("\n");
        } data = br.readLine().split(" ") data br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " h = Integer.parseInt(data[0]) h Integer.parseInt(data[0]) Integer.parseInt Integer data[0] data 0 w = Integer.parseInt(data[1]) w Integer.parseInt(data[1]) Integer.parseInt Integer data[1] data 1 if (h == 0 && w == 0) {
                break;
            } h == 0 && w == 0 h == 0 h 0 w == 0 w 0 {
                break;
            } break; for (int i = 0; i < h; i++) {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            } int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            } {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            } for (int j = 0; j < w; j++) {
                    strb.append("#");
                } int j = 0; int j = 0; j 0 j < w j w j++ j++ j {
                    strb.append("#");
                } {
                    strb.append("#");
                } strb.append("#") strb.append strb "#" strb.append("\n") strb.append strb "\n" strb.append("\n") strb.append strb "\n" System.out.print(strb) System.out.print System.out System System.out strb String[] args args public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in));
        StringBuilder strb = new StringBuilder();
        String[] data;
        int h = 0;
        int w = 0;
        while (true) {
            data = br.readLine().split(" ");
            h = Integer.parseInt(data[0]);
            w = Integer.parseInt(data[1]);
            if (h == 0 && w == 0) {
                break;
            }
            for (int i = 0; i < h; i++) {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            }
            strb.append("\n");
        }
        System.out.print(strb);
    }
} public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in));
        StringBuilder strb = new StringBuilder();
        String[] data;
        int h = 0;
        int w = 0;
        while (true) {
            data = br.readLine().split(" ");
            h = Integer.parseInt(data[0]);
            w = Integer.parseInt(data[1]);
            if (h == 0 && w == 0) {
                break;
            }
            for (int i = 0; i < h; i++) {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            }
            strb.append("\n");
        }
        System.out.print(strb);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in));
        StringBuilder strb = new StringBuilder();
        String[] data;
        int h = 0;
        int w = 0;
        while (true) {
            data = br.readLine().split(" ");
            h = Integer.parseInt(data[0]);
            w = Integer.parseInt(data[1]);
            if (h == 0 && w == 0) {
                break;
            }
            for (int i = 0; i < h; i++) {
                for (int j = 0; j < w; j++) {
                    strb.append("#");
                }
                strb.append("\n");
            }
            strb.append("\n");
        }
        System.out.print(strb);
    }
}