import java.util.Scanner;
 
class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        while (in.hasNext()) {
            int lenH = in.nextInt();
            int lenW = in.nextInt();
 
            if (lenH == 0) {
                break;
            }
             
            String line = repeat('#', lenW);
            for (int i = 0; i < lenH; i++) {
                sb.append(line).append("\n");
            }
             
            sb.append("\n");
        }
        System.out.print(sb.toString());
    }
 
    private static String repeat(char c, int len) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < len; i++) {
            sb.append(c);
        }
        return sb.toString();
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        while (in.hasNext()) {
            int lenH = in.nextInt();
            int lenW = in.nextInt();
 
            if (lenH == 0) {
                break;
            }
             
            String line = repeat('#', lenW);
            for (int i = 0; i < lenH; i++) {
                sb.append(line).append("\n");
            }
             
            sb.append("\n");
        }
        System.out.print(sb.toString());
    }
 
    private static String repeat(char c, int len) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < len; i++) {
            sb.append(c);
        }
        return sb.toString();
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        while (in.hasNext()) {
            int lenH = in.nextInt();
            int lenW = in.nextInt();
 
            if (lenH == 0) {
                break;
            }
             
            String line = repeat('#', lenW);
            for (int i = 0; i < lenH; i++) {
                sb.append(line).append("\n");
            }
             
            sb.append("\n");
        }
        System.out.print(sb.toString());
    } main {
        Scanner in = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        while (in.hasNext()) {
            int lenH = in.nextInt();
            int lenW = in.nextInt();
 
            if (lenH == 0) {
                break;
            }
             
            String line = repeat('#', lenW);
            for (int i = 0; i < lenH; i++) {
                sb.append(line).append("\n");
            }
             
            sb.append("\n");
        }
        System.out.print(sb.toString());
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() while (in.hasNext()) {
            int lenH = in.nextInt();
            int lenW = in.nextInt();
 
            if (lenH == 0) {
                break;
            }
             
            String line = repeat('#', lenW);
            for (int i = 0; i < lenH; i++) {
                sb.append(line).append("\n");
            }
             
            sb.append("\n");
        } in.hasNext() in.hasNext in {
            int lenH = in.nextInt();
            int lenW = in.nextInt();
 
            if (lenH == 0) {
                break;
            }
             
            String line = repeat('#', lenW);
            for (int i = 0; i < lenH; i++) {
                sb.append(line).append("\n");
            }
             
            sb.append("\n");
        } int lenH = in.nextInt(); lenH in.nextInt() in.nextInt in int lenW = in.nextInt(); lenW in.nextInt() in.nextInt in if (lenH == 0) {
                break;
            } lenH == 0 lenH 0 {
                break;
            } break; String line = repeat('#', lenW); line repeat('#', lenW) repeat '#' lenW for (int i = 0; i < lenH; i++) {
                sb.append(line).append("\n");
            } int i = 0; int i = 0; i 0 i < lenH i lenH i++ i++ i {
                sb.append(line).append("\n");
            } {
                sb.append(line).append("\n");
            } sb.append(line).append("\n") sb.append(line).append sb.append(line) sb.append sb line "\n" sb.append("\n") sb.append sb "\n" System.out.print(sb.toString()) System.out.print System.out System System.out sb.toString() sb.toString sb String[] args args private static String repeat(char c, int len) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < len; i++) {
            sb.append(c);
        }
        return sb.toString();
    } repeat {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < len; i++) {
            sb.append(c);
        }
        return sb.toString();
    } StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < len; i++) {
            sb.append(c);
        } int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
            sb.append(c);
        } {
            sb.append(c);
        } sb.append(c) sb.append sb c return sb.toString(); sb.toString() sb.toString sb char c c int len len
import java.util.Scanner;
 
class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        while (in.hasNext()) {
            int lenH = in.nextInt();
            int lenW = in.nextInt();
 
            if (lenH == 0) {
                break;
            }
             
            String line = repeat('#', lenW);
            for (int i = 0; i < lenH; i++) {
                sb.append(line).append("\n");
            }
             
            sb.append("\n");
        }
        System.out.print(sb.toString());
    }
 
    private static String repeat(char c, int len) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < len; i++) {
            sb.append(c);
        }
        return sb.toString();
    }
}