import java.io.*;

class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nums;
        int h, w, i, j;
        while (true) {
            nums = br.readLine().split(" ");
            h = Integer.parseInt(nums[0]);
            w = Integer.parseInt(nums[1]);
            if (h == 0 && w == 0) break;
            for (i = 0; i < h; i++) {
                for (j = 0; j < w; j++) {
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        }
    }
} import java.io.*; io.* java class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nums;
        int h, w, i, j;
        while (true) {
            nums = br.readLine().split(" ");
            h = Integer.parseInt(nums[0]);
            w = Integer.parseInt(nums[1]);
            if (h == 0 && w == 0) break;
            for (i = 0; i < h; i++) {
                for (j = 0; j < w; j++) {
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        }
    }
} Main public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nums;
        int h, w, i, j;
        while (true) {
            nums = br.readLine().split(" ");
            h = Integer.parseInt(nums[0]);
            w = Integer.parseInt(nums[1]);
            if (h == 0 && w == 0) break;
            for (i = 0; i < h; i++) {
                for (j = 0; j < w; j++) {
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] nums;
        int h, w, i, j;
        while (true) {
            nums = br.readLine().split(" ");
            h = Integer.parseInt(nums[0]);
            w = Integer.parseInt(nums[1]);
            if (h == 0 && w == 0) break;
            for (i = 0; i < h; i++) {
                for (j = 0; j < w; j++) {
                    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[] nums; nums int h h w w i i j; j while (true) {
            nums = br.readLine().split(" ");
            h = Integer.parseInt(nums[0]);
            w = Integer.parseInt(nums[1]);
            if (h == 0 && w == 0) break;
            for (i = 0; i < h; i++) {
                for (j = 0; j < w; j++) {
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        } true {
            nums = br.readLine().split(" ");
            h = Integer.parseInt(nums[0]);
            w = Integer.parseInt(nums[1]);
            if (h == 0 && w == 0) break;
            for (i = 0; i < h; i++) {
                for (j = 0; j < w; j++) {
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        } nums = br.readLine().split(" ") nums br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " h = Integer.parseInt(nums[0]) h Integer.parseInt(nums[0]) Integer.parseInt Integer nums[0] nums 0 w = Integer.parseInt(nums[1]) w Integer.parseInt(nums[1]) Integer.parseInt Integer nums[1] nums 1 if (h == 0 && w == 0) break; h == 0 && w == 0 h == 0 h 0 w == 0 w 0 break; for (i = 0; i < h; i++) {
                for (j = 0; j < w; j++) {
                    System.out.print("#");
                }
                System.out.println();
            } i = 0; i = 0 i 0 i < h i h i++ i++ i {
                for (j = 0; j < w; j++) {
                    System.out.print("#");
                }
                System.out.println();
            } {
                for (j = 0; j < w; j++) {
                    System.out.print("#");
                }
                System.out.println();
            } for (j = 0; j < w; j++) {
                    System.out.print("#");
                } j = 0; j = 0 j 0 j < w j w 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
import java.io.*;

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