import static java.lang.System.out;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
            int H = scan.nextInt();
            int W = scan.nextInt();
            if (H == 0 && W == 0) {
                break;
            }

            for (int i = 0; i < H; i += 1) {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            }
            out.println();                                             
        }
    }   
} import static java.lang.System.out; import static java.lang.System.out; import static java.lang.System.out; import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
            int H = scan.nextInt();
            int W = scan.nextInt();
            if (H == 0 && W == 0) {
                break;
            }

            for (int i = 0; i < H; i += 1) {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            }
            out.println();                                             
        }
    }   
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
            int H = scan.nextInt();
            int W = scan.nextInt();
            if (H == 0 && W == 0) {
                break;
            }

            for (int i = 0; i < H; i += 1) {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            }
            out.println();                                             
        }
    } main {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
            int H = scan.nextInt();
            int W = scan.nextInt();
            if (H == 0 && W == 0) {
                break;
            }

            for (int i = 0; i < H; i += 1) {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            }
            out.println();                                             
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while (scan.hasNext()) {
            int H = scan.nextInt();
            int W = scan.nextInt();
            if (H == 0 && W == 0) {
                break;
            }

            for (int i = 0; i < H; i += 1) {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            }
            out.println();                                             
        } scan.hasNext() scan.hasNext scan {
            int H = scan.nextInt();
            int W = scan.nextInt();
            if (H == 0 && W == 0) {
                break;
            }

            for (int i = 0; i < H; i += 1) {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            }
            out.println();                                             
        } int H = scan.nextInt(); H scan.nextInt() scan.nextInt scan int W = scan.nextInt(); W scan.nextInt() scan.nextInt scan 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 += 1) {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            } int i = 0; int i = 0; i 0 i < H i H i += 1 i += 1 i 1 {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            } {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            } for (int j = 0; j < W; j += 1) {
                    out.print("#");
                } int j = 0; int j = 0; j 0 j < W j W j += 1 j += 1 j 1 {
                    out.print("#");
                } {
                    out.print("#");
                } out.print("#") out.print out "#" out.println() out.println out out.println() out.println out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
            int H = scan.nextInt();
            int W = scan.nextInt();
            if (H == 0 && W == 0) {
                break;
            }

            for (int i = 0; i < H; i += 1) {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            }
            out.println();                                             
        }
    }   
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
            int H = scan.nextInt();
            int W = scan.nextInt();
            if (H == 0 && W == 0) {
                break;
            }

            for (int i = 0; i < H; i += 1) {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            }
            out.println();                                             
        }
    }   
} Main
import static java.lang.System.out;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
            int H = scan.nextInt();
            int W = scan.nextInt();
            if (H == 0 && W == 0) {
                break;
            }

            for (int i = 0; i < H; i += 1) {
                for (int j = 0; j < W; j += 1) {
                    out.print("#");
                }
                out.println();
            }
            out.println();                                             
        }
    }   
}