import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args) {
        int[] H;
        int[] W;
        H = new int[100000];
        W = new int[100000];
        int i, j, k, l;
        int count = 0;
    Scanner sc = new Scanner(System.in);
        for(i=1;i<100000;i++){
        int h = sc.nextInt();
        int w = sc.nextInt();
        H[i] = h;
        W[i] = w;
        if (H[i]==0 && W[i]==0) break;
        count++;
        }

        for (j=1;j<=count;j++){
            for (k=1;k<=H[j];k++){
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
    public static void main(String[] args) {
        int[] H;
        int[] W;
        H = new int[100000];
        W = new int[100000];
        int i, j, k, l;
        int count = 0;
    Scanner sc = new Scanner(System.in);
        for(i=1;i<100000;i++){
        int h = sc.nextInt();
        int w = sc.nextInt();
        H[i] = h;
        W[i] = w;
        if (H[i]==0 && W[i]==0) break;
        count++;
        }

        for (j=1;j<=count;j++){
            for (k=1;k<=H[j];k++){
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        }
    }
} Main public static void main(String[] args) {
        int[] H;
        int[] W;
        H = new int[100000];
        W = new int[100000];
        int i, j, k, l;
        int count = 0;
    Scanner sc = new Scanner(System.in);
        for(i=1;i<100000;i++){
        int h = sc.nextInt();
        int w = sc.nextInt();
        H[i] = h;
        W[i] = w;
        if (H[i]==0 && W[i]==0) break;
        count++;
        }

        for (j=1;j<=count;j++){
            for (k=1;k<=H[j];k++){
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        }
    } main {
        int[] H;
        int[] W;
        H = new int[100000];
        W = new int[100000];
        int i, j, k, l;
        int count = 0;
    Scanner sc = new Scanner(System.in);
        for(i=1;i<100000;i++){
        int h = sc.nextInt();
        int w = sc.nextInt();
        H[i] = h;
        W[i] = w;
        if (H[i]==0 && W[i]==0) break;
        count++;
        }

        for (j=1;j<=count;j++){
            for (k=1;k<=H[j];k++){
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        }
    } int[] H; H int[] W; W H = new int[100000] H new int[100000] 100000 W = new int[100000] W new int[100000] 100000 int i i j j k k l; l int count = 0; count 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for(i=1;i<100000;i++){
        int h = sc.nextInt();
        int w = sc.nextInt();
        H[i] = h;
        W[i] = w;
        if (H[i]==0 && W[i]==0) break;
        count++;
        } i=1; i=1 i 1 i<100000 i 100000 i++ i++ i {
        int h = sc.nextInt();
        int w = sc.nextInt();
        H[i] = h;
        W[i] = w;
        if (H[i]==0 && W[i]==0) break;
        count++;
        } {
        int h = sc.nextInt();
        int w = sc.nextInt();
        H[i] = h;
        W[i] = w;
        if (H[i]==0 && W[i]==0) break;
        count++;
        } int h = sc.nextInt(); h sc.nextInt() sc.nextInt sc int w = sc.nextInt(); w sc.nextInt() sc.nextInt sc H[i] = h H[i] H i h W[i] = w W[i] W i w if (H[i]==0 && W[i]==0) break; H[i]==0 && W[i]==0 H[i]==0 H[i] H i 0 W[i]==0 W[i] W i 0 break; count++ count for (j=1;j<=count;j++){
            for (k=1;k<=H[j];k++){
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        } j=1; j=1 j 1 j<=count j count j++ j++ j {
            for (k=1;k<=H[j];k++){
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        } {
            for (k=1;k<=H[j];k++){
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        } for (k=1;k<=H[j];k++){
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            } k=1; k=1 k 1 k<=H[j] k H[j] H j k++ k++ k {
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            } {
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            } for (l=1;l<=W[j];l++){
                    System.out.print("#");
                } l=1; l=1 l 1 l<=W[j] l W[j] W j l++ l++ l {
                    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) {
        int[] H;
        int[] W;
        H = new int[100000];
        W = new int[100000];
        int i, j, k, l;
        int count = 0;
    Scanner sc = new Scanner(System.in);
        for(i=1;i<100000;i++){
        int h = sc.nextInt();
        int w = sc.nextInt();
        H[i] = h;
        W[i] = w;
        if (H[i]==0 && W[i]==0) break;
        count++;
        }

        for (j=1;j<=count;j++){
            for (k=1;k<=H[j];k++){
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        }
    }
} public class Main{
    public static void main(String[] args) {
        int[] H;
        int[] W;
        H = new int[100000];
        W = new int[100000];
        int i, j, k, l;
        int count = 0;
    Scanner sc = new Scanner(System.in);
        for(i=1;i<100000;i++){
        int h = sc.nextInt();
        int w = sc.nextInt();
        H[i] = h;
        W[i] = w;
        if (H[i]==0 && W[i]==0) break;
        count++;
        }

        for (j=1;j<=count;j++){
            for (k=1;k<=H[j];k++){
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        }
    }
} Main
import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args) {
        int[] H;
        int[] W;
        H = new int[100000];
        W = new int[100000];
        int i, j, k, l;
        int count = 0;
    Scanner sc = new Scanner(System.in);
        for(i=1;i<100000;i++){
        int h = sc.nextInt();
        int w = sc.nextInt();
        H[i] = h;
        W[i] = w;
        if (H[i]==0 && W[i]==0) break;
        count++;
        }

        for (j=1;j<=count;j++){
            for (k=1;k<=H[j];k++){
                for (l=1;l<=W[j];l++){
                    System.out.print("#");
                }
                System.out.println();
            }
            System.out.println();
        }
    }
}
