import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int H;
        int W;
        while ((H = scanner.nextInt()) != 0 && (W = scanner.nextInt()) != 0) {
            for (int h = 0; h < H; h++) {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            }
            System.out.println("");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int H;
        int W;
        while ((H = scanner.nextInt()) != 0 && (W = scanner.nextInt()) != 0) {
            for (int h = 0; h < H; h++) {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            }
            System.out.println("");
        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int H;
        int W;
        while ((H = scanner.nextInt()) != 0 && (W = scanner.nextInt()) != 0) {
            for (int h = 0; h < H; h++) {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            }
            System.out.println("");
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        int H;
        int W;
        while ((H = scanner.nextInt()) != 0 && (W = scanner.nextInt()) != 0) {
            for (int h = 0; h < H; h++) {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            }
            System.out.println("");
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int H; H int W; W while ((H = scanner.nextInt()) != 0 && (W = scanner.nextInt()) != 0) {
            for (int h = 0; h < H; h++) {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            }
            System.out.println("");
        } (H = scanner.nextInt()) != 0 && (W = scanner.nextInt()) != 0 (H = scanner.nextInt()) != 0 (H = scanner.nextInt()) H scanner.nextInt() scanner.nextInt scanner 0 (W = scanner.nextInt()) != 0 (W = scanner.nextInt()) W scanner.nextInt() scanner.nextInt scanner 0 {
            for (int h = 0; h < H; h++) {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            }
            System.out.println("");
        } for (int h = 0; h < H; h++) {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            } int h = 0; int h = 0; h 0 h < H h H h++ h++ h {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            } {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            } for (int w = 0; w < W; w++) {
                    System.out.print('#');
                } int w = 0; int w = 0; w 0 w < W w W w++ w++ w {
                    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 scanner = new Scanner(System.in);
        int H;
        int W;
        while ((H = scanner.nextInt()) != 0 && (W = scanner.nextInt()) != 0) {
            for (int h = 0; h < H; h++) {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            }
            System.out.println("");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int H;
        int W;
        while ((H = scanner.nextInt()) != 0 && (W = scanner.nextInt()) != 0) {
            for (int h = 0; h < H; h++) {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            }
            System.out.println("");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int H;
        int W;
        while ((H = scanner.nextInt()) != 0 && (W = scanner.nextInt()) != 0) {
            for (int h = 0; h < H; h++) {
                for (int w = 0; w < W; w++) {
                    System.out.print('#');
                }
                System.out.println("");
            }
            System.out.println("");
        }
    }
}
