import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        while(true) {
            int H = scn.nextInt();
            int W = scn.nextInt();
            if(H == 0 && W == 0) {
                break;
            }
            char[] buf = new char[W];
            Arrays.fill(buf, '#');
            String lin = new String(buf);
            for(int i = 0; i < H; i++) {
                System.out.println(lin);
            }
            System.out.println();
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        while(true) {
            int H = scn.nextInt();
            int W = scn.nextInt();
            if(H == 0 && W == 0) {
                break;
            }
            char[] buf = new char[W];
            Arrays.fill(buf, '#');
            String lin = new String(buf);
            for(int i = 0; i < H; i++) {
                System.out.println(lin);
            }
            System.out.println();
        }
    }
} Main public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        while(true) {
            int H = scn.nextInt();
            int W = scn.nextInt();
            if(H == 0 && W == 0) {
                break;
            }
            char[] buf = new char[W];
            Arrays.fill(buf, '#');
            String lin = new String(buf);
            for(int i = 0; i < H; i++) {
                System.out.println(lin);
            }
            System.out.println();
        }
    } main {
        Scanner scn = new Scanner(System.in);
        while(true) {
            int H = scn.nextInt();
            int W = scn.nextInt();
            if(H == 0 && W == 0) {
                break;
            }
            char[] buf = new char[W];
            Arrays.fill(buf, '#');
            String lin = new String(buf);
            for(int i = 0; i < H; i++) {
                System.out.println(lin);
            }
            System.out.println();
        }
    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) while(true) {
            int H = scn.nextInt();
            int W = scn.nextInt();
            if(H == 0 && W == 0) {
                break;
            }
            char[] buf = new char[W];
            Arrays.fill(buf, '#');
            String lin = new String(buf);
            for(int i = 0; i < H; i++) {
                System.out.println(lin);
            }
            System.out.println();
        } true {
            int H = scn.nextInt();
            int W = scn.nextInt();
            if(H == 0 && W == 0) {
                break;
            }
            char[] buf = new char[W];
            Arrays.fill(buf, '#');
            String lin = new String(buf);
            for(int i = 0; i < H; i++) {
                System.out.println(lin);
            }
            System.out.println();
        } int H = scn.nextInt(); H scn.nextInt() scn.nextInt scn int W = scn.nextInt(); W scn.nextInt() scn.nextInt scn if(H == 0 && W == 0) {
                break;
            } H == 0 && W == 0 H == 0 H 0 W == 0 W 0 {
                break;
            } break; char[] buf = new char[W]; buf new char[W] W Arrays.fill(buf, '#') Arrays.fill Arrays buf '#' String lin = new String(buf); lin new String(buf) for(int i = 0; i < H; i++) {
                System.out.println(lin);
            } int i = 0; int i = 0; i 0 i < H i H i++ i++ i {
                System.out.println(lin);
            } {
                System.out.println(lin);
            } System.out.println(lin) System.out.println System.out System System.out lin System.out.println() System.out.println System.out System System.out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        while(true) {
            int H = scn.nextInt();
            int W = scn.nextInt();
            if(H == 0 && W == 0) {
                break;
            }
            char[] buf = new char[W];
            Arrays.fill(buf, '#');
            String lin = new String(buf);
            for(int i = 0; i < H; i++) {
                System.out.println(lin);
            }
            System.out.println();
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        while(true) {
            int H = scn.nextInt();
            int W = scn.nextInt();
            if(H == 0 && W == 0) {
                break;
            }
            char[] buf = new char[W];
            Arrays.fill(buf, '#');
            String lin = new String(buf);
            for(int i = 0; i < H; i++) {
                System.out.println(lin);
            }
            System.out.println();
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        while(true) {
            int H = scn.nextInt();
            int W = scn.nextInt();
            if(H == 0 && W == 0) {
                break;
            }
            char[] buf = new char[W];
            Arrays.fill(buf, '#');
            String lin = new String(buf);
            for(int i = 0; i < H; i++) {
                System.out.println(lin);
            }
            System.out.println();
        }
    }
}