import java.io.PrintWriter;
import java.util.Scanner;

class Main{
    private static final Scanner sc = new Scanner(System.in);
    private static final PrintWriter out = new PrintWriter(System.out);
    public static void main(String[] Args){
        while(true){
            final int h = Integer.parseInt(sc.next());
            final int w = Integer.parseInt(sc.next());
            if(h==0&&w==0) break;
            for(int i = 0; i<h; i++){
                for(int j = 0; j<w; j++){
                    out.print("#");
                }
                out.println();
            }
            out.println();
        }
        out.flush();
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util class Main{
    private static final Scanner sc = new Scanner(System.in);
    private static final PrintWriter out = new PrintWriter(System.out);
    public static void main(String[] Args){
        while(true){
            final int h = Integer.parseInt(sc.next());
            final int w = Integer.parseInt(sc.next());
            if(h==0&&w==0) break;
            for(int i = 0; i<h; i++){
                for(int j = 0; j<w; j++){
                    out.print("#");
                }
                out.println();
            }
            out.println();
        }
        out.flush();
    }
} Main private static final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) private static final PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) public static void main(String[] Args){
        while(true){
            final int h = Integer.parseInt(sc.next());
            final int w = Integer.parseInt(sc.next());
            if(h==0&&w==0) break;
            for(int i = 0; i<h; i++){
                for(int j = 0; j<w; j++){
                    out.print("#");
                }
                out.println();
            }
            out.println();
        }
        out.flush();
    } main {
        while(true){
            final int h = Integer.parseInt(sc.next());
            final int w = Integer.parseInt(sc.next());
            if(h==0&&w==0) break;
            for(int i = 0; i<h; i++){
                for(int j = 0; j<w; j++){
                    out.print("#");
                }
                out.println();
            }
            out.println();
        }
        out.flush();
    } while(true){
            final int h = Integer.parseInt(sc.next());
            final int w = Integer.parseInt(sc.next());
            if(h==0&&w==0) break;
            for(int i = 0; i<h; i++){
                for(int j = 0; j<w; j++){
                    out.print("#");
                }
                out.println();
            }
            out.println();
        } true {
            final int h = Integer.parseInt(sc.next());
            final int w = Integer.parseInt(sc.next());
            if(h==0&&w==0) break;
            for(int i = 0; i<h; i++){
                for(int j = 0; j<w; j++){
                    out.print("#");
                }
                out.println();
            }
            out.println();
        } final int h = Integer.parseInt(sc.next()); h Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc final int w = Integer.parseInt(sc.next()); w Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(h==0&&w==0) break; h==0&&w==0 h==0 h 0 w==0 w 0 break; for(int i = 0; i<h; i++){
                for(int j = 0; j<w; j++){
                    out.print("#");
                }
                out.println();
            } int i = 0; int i = 0; i 0 i<h i h i++ i++ i {
                for(int j = 0; j<w; j++){
                    out.print("#");
                }
                out.println();
            } {
                for(int j = 0; j<w; j++){
                    out.print("#");
                }
                out.println();
            } for(int j = 0; j<w; j++){
                    out.print("#");
                } int j = 0; int j = 0; j 0 j<w j w j++ j++ j {
                    out.print("#");
                } {
                    out.print("#");
                } out.print("#") out.print out "#" out.println() out.println out out.println() out.println out out.flush() out.flush out String[] Args Args
import java.io.PrintWriter;
import java.util.Scanner;

class Main{
    private static final Scanner sc = new Scanner(System.in);
    private static final PrintWriter out = new PrintWriter(System.out);
    public static void main(String[] Args){
        while(true){
            final int h = Integer.parseInt(sc.next());
            final int w = Integer.parseInt(sc.next());
            if(h==0&&w==0) break;
            for(int i = 0; i<h; i++){
                for(int j = 0; j<w; j++){
                    out.print("#");
                }
                out.println();
            }
            out.println();
        }
        out.flush();
    }
}