import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;

public class Main {
    public void exec() throws IOException {
        InputUtil input = new InputUtil();
        PrintWriter out = new PrintWriter(System.out);
        while(true) {
            int H = input.nextInt();
            int W = input.nextInt();
            if(H==0 && W==0) break;
            for(int y=0; y<H; y++) {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            }
            out.println("");
        }
        out.flush();
        input.close();
    }
 
    public static void main(String[] args) throws IOException {
    	new Main().exec();
    }

}
 
/**
 * --------------------------------------------------
 * Input Utility
 * --------------------------------------------------
 */
class InputUtil {
    //Static Fields
    private static final int BUFSIZ = 2100005;
     
    //Fields
    protected InputStream in;
    private char[] buf = null;
    private int ptr = 0;
    private int max = -1;
    private BufferedReader br = null;
     
    //Constructors
    public InputUtil() {this(System.in,BUFSIZ);}
    public InputUtil(int bufsiz) {this(System.in,bufsiz);}
    public InputUtil(InputStream in) {this(in,BUFSIZ);}
    public InputUtil(InputStream in, int bufsiz) {
        initBuf(bufsiz);
        initIn(in);
    }
     
    //Methods
    //Initializer
    protected void initIn(InputStream in) {br = new BufferedReader(new InputStreamReader(this.in = in));}
    protected void initBuf(int bufsiz) {buf = new char[bufsiz];}
     
    //String Input Reader/Parser
    private void readBuf() throws IOException {
        if(ptr >= max && br.ready()) {
            max = br.read(buf);
            ptr = 0;
        }
    }
     
    public BufferedReader getReader() {return br;}
     
    //Number Input Reader/Parser
    private boolean isNum(char b) {return '0' <= b && b <= '9'; }
    private boolean isMinus(char b) {return b=='-'; }
    private void next() throws IOException {ptr++; readBuf();}
 
 
    public int nextInt() throws IOException {return nextInt(new int[1])[0];}
    public int[] nextInt(int[] result) throws IOException {
        readBuf();
        for(int i=0; i<result.length; i++) {
            int sign = 1;
            int res = 0;
            char c;
            while (!isNum(c=buf[ptr]) && !isMinus(c)) 
                next();
            if (isMinus(buf[ptr])) {
                sign = -1;
                next();
            }
            while (isNum(c=buf[ptr])) {
                res *= 10;
                res += c - '0' ;
                next();
            }
            next();
            result[i] = sign * res;
        }
        return result;
    }
     
    //Close 
    public void close() throws IOException {
        if(!this.in.equals(System.in)) 
            this.in.close();
    }
 
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Arrays; Arrays java.util public class Main {
    public void exec() throws IOException {
        InputUtil input = new InputUtil();
        PrintWriter out = new PrintWriter(System.out);
        while(true) {
            int H = input.nextInt();
            int W = input.nextInt();
            if(H==0 && W==0) break;
            for(int y=0; y<H; y++) {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            }
            out.println("");
        }
        out.flush();
        input.close();
    }
 
    public static void main(String[] args) throws IOException {
    	new Main().exec();
    }

} Main public void exec() throws IOException {
        InputUtil input = new InputUtil();
        PrintWriter out = new PrintWriter(System.out);
        while(true) {
            int H = input.nextInt();
            int W = input.nextInt();
            if(H==0 && W==0) break;
            for(int y=0; y<H; y++) {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            }
            out.println("");
        }
        out.flush();
        input.close();
    } exec {
        InputUtil input = new InputUtil();
        PrintWriter out = new PrintWriter(System.out);
        while(true) {
            int H = input.nextInt();
            int W = input.nextInt();
            if(H==0 && W==0) break;
            for(int y=0; y<H; y++) {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            }
            out.println("");
        }
        out.flush();
        input.close();
    } InputUtil input = new InputUtil(); input new InputUtil() PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) while(true) {
            int H = input.nextInt();
            int W = input.nextInt();
            if(H==0 && W==0) break;
            for(int y=0; y<H; y++) {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            }
            out.println("");
        } true {
            int H = input.nextInt();
            int W = input.nextInt();
            if(H==0 && W==0) break;
            for(int y=0; y<H; y++) {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            }
            out.println("");
        } int H = input.nextInt(); H input.nextInt() input.nextInt input int W = input.nextInt(); W input.nextInt() input.nextInt input if(H==0 && W==0) break; H==0 && W==0 H==0 H 0 W==0 W 0 break; for(int y=0; y<H; y++) {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            } int y=0; int y=0; y 0 y<H y H y++ y++ y {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            } {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            } char[] cbuf = new char[W]; cbuf new char[W] W Arrays.fill(cbuf, '#') Arrays.fill Arrays cbuf '#' out.println(cbuf) out.println out cbuf out.println("") out.println out "" out.flush() out.flush out input.close() input.close input public static void main(String[] args) throws IOException {
    	new Main().exec();
    } main {
    	new Main().exec();
    } new Main().exec() new Main().exec new Main() String[] args args class InputUtil {
    //Static Fields
    private static final int BUFSIZ = 2100005;
     
    //Fields
    protected InputStream in;
    private char[] buf = null;
    private int ptr = 0;
    private int max = -1;
    private BufferedReader br = null;
     
    //Constructors
    public InputUtil() {this(System.in,BUFSIZ);}
    public InputUtil(int bufsiz) {this(System.in,bufsiz);}
    public InputUtil(InputStream in) {this(in,BUFSIZ);}
    public InputUtil(InputStream in, int bufsiz) {
        initBuf(bufsiz);
        initIn(in);
    }
     
    //Methods
    //Initializer
    protected void initIn(InputStream in) {br = new BufferedReader(new InputStreamReader(this.in = in));}
    protected void initBuf(int bufsiz) {buf = new char[bufsiz];}
     
    //String Input Reader/Parser
    private void readBuf() throws IOException {
        if(ptr >= max && br.ready()) {
            max = br.read(buf);
            ptr = 0;
        }
    }
     
    public BufferedReader getReader() {return br;}
     
    //Number Input Reader/Parser
    private boolean isNum(char b) {return '0' <= b && b <= '9'; }
    private boolean isMinus(char b) {return b=='-'; }
    private void next() throws IOException {ptr++; readBuf();}
 
 
    public int nextInt() throws IOException {return nextInt(new int[1])[0];}
    public int[] nextInt(int[] result) throws IOException {
        readBuf();
        for(int i=0; i<result.length; i++) {
            int sign = 1;
            int res = 0;
            char c;
            while (!isNum(c=buf[ptr]) && !isMinus(c)) 
                next();
            if (isMinus(buf[ptr])) {
                sign = -1;
                next();
            }
            while (isNum(c=buf[ptr])) {
                res *= 10;
                res += c - '0' ;
                next();
            }
            next();
            result[i] = sign * res;
        }
        return result;
    }
     
    //Close 
    public void close() throws IOException {
        if(!this.in.equals(System.in)) 
            this.in.close();
    }
 
} InputUtil //Static Fields
    private static final int BUFSIZ = 2100005; BUFSIZ 2100005 //Fields
    protected InputStream in; in private char[] buf = null; buf null private int ptr = 0; ptr 0 private int max = -1; max -1 1 private BufferedReader br = null; br null //Constructors
    public InputUtil() {this(System.in,BUFSIZ);} InputUtil {this(System.in,BUFSIZ);} this(System.in,BUFSIZ) this System.in System System.in BUFSIZ public InputUtil(int bufsiz) {this(System.in,bufsiz);} InputUtil {this(System.in,bufsiz);} this(System.in,bufsiz) this System.in System System.in bufsiz int bufsiz bufsiz public InputUtil(InputStream in) {this(in,BUFSIZ);} InputUtil {this(in,BUFSIZ);} this(in,BUFSIZ) this in BUFSIZ InputStream in in public InputUtil(InputStream in, int bufsiz) {
        initBuf(bufsiz);
        initIn(in);
    } InputUtil {
        initBuf(bufsiz);
        initIn(in);
    } initBuf(bufsiz) initBuf bufsiz initIn(in) initIn in InputStream in in int bufsiz bufsiz //Methods
    //Initializer
    protected void initIn(InputStream in) {br = new BufferedReader(new InputStreamReader(this.in = in));} initIn {br = new BufferedReader(new InputStreamReader(this.in = in));} br = new BufferedReader(new InputStreamReader(this.in = in)) br new BufferedReader(new InputStreamReader(this.in = in)) InputStream in in protected void initBuf(int bufsiz) {buf = new char[bufsiz];} initBuf {buf = new char[bufsiz];} buf = new char[bufsiz] buf new char[bufsiz] bufsiz int bufsiz bufsiz //String Input Reader/Parser
    private void readBuf() throws IOException {
        if(ptr >= max && br.ready()) {
            max = br.read(buf);
            ptr = 0;
        }
    } readBuf {
        if(ptr >= max && br.ready()) {
            max = br.read(buf);
            ptr = 0;
        }
    } if(ptr >= max && br.ready()) {
            max = br.read(buf);
            ptr = 0;
        } ptr >= max && br.ready() ptr >= max ptr max br.ready() br.ready br {
            max = br.read(buf);
            ptr = 0;
        } max = br.read(buf) max br.read(buf) br.read br buf ptr = 0 ptr 0 public BufferedReader getReader() {return br;} getReader {return br;} return br; br //Number Input Reader/Parser
    private boolean isNum(char b) {return '0' <= b && b <= '9'; } isNum {return '0' <= b && b <= '9'; } return '0' <= b && b <= '9'; '0' <= b && b <= '9' '0' <= b '0' b b <= '9' b '9' char b b private boolean isMinus(char b) {return b=='-'; } isMinus {return b=='-'; } return b=='-'; b=='-' b '-' char b b private void next() throws IOException {ptr++; readBuf();} next {ptr++; readBuf();} ptr++ ptr readBuf() readBuf public int nextInt() throws IOException {return nextInt(new int[1])[0];} nextInt {return nextInt(new int[1])[0];} return nextInt(new int[1])[0]; nextInt(new int[1])[0] nextInt(new int[1]) nextInt new int[1] 1 0 public int[] nextInt(int[] result) throws IOException {
        readBuf();
        for(int i=0; i<result.length; i++) {
            int sign = 1;
            int res = 0;
            char c;
            while (!isNum(c=buf[ptr]) && !isMinus(c)) 
                next();
            if (isMinus(buf[ptr])) {
                sign = -1;
                next();
            }
            while (isNum(c=buf[ptr])) {
                res *= 10;
                res += c - '0' ;
                next();
            }
            next();
            result[i] = sign * res;
        }
        return result;
    } nextInt {
        readBuf();
        for(int i=0; i<result.length; i++) {
            int sign = 1;
            int res = 0;
            char c;
            while (!isNum(c=buf[ptr]) && !isMinus(c)) 
                next();
            if (isMinus(buf[ptr])) {
                sign = -1;
                next();
            }
            while (isNum(c=buf[ptr])) {
                res *= 10;
                res += c - '0' ;
                next();
            }
            next();
            result[i] = sign * res;
        }
        return result;
    } readBuf() readBuf for(int i=0; i<result.length; i++) {
            int sign = 1;
            int res = 0;
            char c;
            while (!isNum(c=buf[ptr]) && !isMinus(c)) 
                next();
            if (isMinus(buf[ptr])) {
                sign = -1;
                next();
            }
            while (isNum(c=buf[ptr])) {
                res *= 10;
                res += c - '0' ;
                next();
            }
            next();
            result[i] = sign * res;
        } int i=0; int i=0; i 0 i<result.length i result.length result result.length i++ i++ i {
            int sign = 1;
            int res = 0;
            char c;
            while (!isNum(c=buf[ptr]) && !isMinus(c)) 
                next();
            if (isMinus(buf[ptr])) {
                sign = -1;
                next();
            }
            while (isNum(c=buf[ptr])) {
                res *= 10;
                res += c - '0' ;
                next();
            }
            next();
            result[i] = sign * res;
        } {
            int sign = 1;
            int res = 0;
            char c;
            while (!isNum(c=buf[ptr]) && !isMinus(c)) 
                next();
            if (isMinus(buf[ptr])) {
                sign = -1;
                next();
            }
            while (isNum(c=buf[ptr])) {
                res *= 10;
                res += c - '0' ;
                next();
            }
            next();
            result[i] = sign * res;
        } int sign = 1; sign 1 int res = 0; res 0 char c; c while (!isNum(c=buf[ptr]) && !isMinus(c)) 
                next(); !isNum(c=buf[ptr]) && !isMinus(c) !isNum(c=buf[ptr]) isNum(c=buf[ptr]) isNum c=buf[ptr] c buf[ptr] buf ptr !isMinus(c) isMinus(c) isMinus c next() next if (isMinus(buf[ptr])) {
                sign = -1;
                next();
            } isMinus(buf[ptr]) isMinus buf[ptr] buf ptr {
                sign = -1;
                next();
            } sign = -1 sign -1 1 next() next while (isNum(c=buf[ptr])) {
                res *= 10;
                res += c - '0' ;
                next();
            } isNum(c=buf[ptr]) isNum c=buf[ptr] c buf[ptr] buf ptr {
                res *= 10;
                res += c - '0' ;
                next();
            } res *= 10 res 10 res += c - '0' res c - '0' c '0' next() next next() next result[i] = sign * res result[i] result i sign * res sign res return result; result int[] result result //Close 
    public void close() throws IOException {
        if(!this.in.equals(System.in)) 
            this.in.close();
    } close {
        if(!this.in.equals(System.in)) 
            this.in.close();
    } if(!this.in.equals(System.in)) 
            this.in.close(); !this.in.equals(System.in) this.in.equals(System.in) this.in.equals this.in this this.in System.in System System.in this.in.close() this.in.close this.in this this.in public class Main {
    public void exec() throws IOException {
        InputUtil input = new InputUtil();
        PrintWriter out = new PrintWriter(System.out);
        while(true) {
            int H = input.nextInt();
            int W = input.nextInt();
            if(H==0 && W==0) break;
            for(int y=0; y<H; y++) {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            }
            out.println("");
        }
        out.flush();
        input.close();
    }
 
    public static void main(String[] args) throws IOException {
    	new Main().exec();
    }

} public class Main {
    public void exec() throws IOException {
        InputUtil input = new InputUtil();
        PrintWriter out = new PrintWriter(System.out);
        while(true) {
            int H = input.nextInt();
            int W = input.nextInt();
            if(H==0 && W==0) break;
            for(int y=0; y<H; y++) {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            }
            out.println("");
        }
        out.flush();
        input.close();
    }
 
    public static void main(String[] args) throws IOException {
    	new Main().exec();
    }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;

public class Main {
    public void exec() throws IOException {
        InputUtil input = new InputUtil();
        PrintWriter out = new PrintWriter(System.out);
        while(true) {
            int H = input.nextInt();
            int W = input.nextInt();
            if(H==0 && W==0) break;
            for(int y=0; y<H; y++) {
            	char[] cbuf = new char[W];
            	Arrays.fill(cbuf, '#');
            	out.println(cbuf);
            }
            out.println("");
        }
        out.flush();
        input.close();
    }
 
    public static void main(String[] args) throws IOException {
    	new Main().exec();
    }

}
 
/**
 * --------------------------------------------------
 * Input Utility
 * --------------------------------------------------
 */
class InputUtil {
    //Static Fields
    private static final int BUFSIZ = 2100005;
     
    //Fields
    protected InputStream in;
    private char[] buf = null;
    private int ptr = 0;
    private int max = -1;
    private BufferedReader br = null;
     
    //Constructors
    public InputUtil() {this(System.in,BUFSIZ);}
    public InputUtil(int bufsiz) {this(System.in,bufsiz);}
    public InputUtil(InputStream in) {this(in,BUFSIZ);}
    public InputUtil(InputStream in, int bufsiz) {
        initBuf(bufsiz);
        initIn(in);
    }
     
    //Methods
    //Initializer
    protected void initIn(InputStream in) {br = new BufferedReader(new InputStreamReader(this.in = in));}
    protected void initBuf(int bufsiz) {buf = new char[bufsiz];}
     
    //String Input Reader/Parser
    private void readBuf() throws IOException {
        if(ptr >= max && br.ready()) {
            max = br.read(buf);
            ptr = 0;
        }
    }
     
    public BufferedReader getReader() {return br;}
     
    //Number Input Reader/Parser
    private boolean isNum(char b) {return '0' <= b && b <= '9'; }
    private boolean isMinus(char b) {return b=='-'; }
    private void next() throws IOException {ptr++; readBuf();}
 
 
    public int nextInt() throws IOException {return nextInt(new int[1])[0];}
    public int[] nextInt(int[] result) throws IOException {
        readBuf();
        for(int i=0; i<result.length; i++) {
            int sign = 1;
            int res = 0;
            char c;
            while (!isNum(c=buf[ptr]) && !isMinus(c)) 
                next();
            if (isMinus(buf[ptr])) {
                sign = -1;
                next();
            }
            while (isNum(c=buf[ptr])) {
                res *= 10;
                res += c - '0' ;
                next();
            }
            next();
            result[i] = sign * res;
        }
        return result;
    }
     
    //Close 
    public void close() throws IOException {
        if(!this.in.equals(System.in)) 
            this.in.close();
    }
 
}