import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            int[] a = new int[]{sc.nextInt(), sc.nextInt()};
            if (a[0] == 0 && a[1] == 0) {
                break;
            }
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < a[0]; i++) {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            }
            System.out.println(sb.toString());
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            int[] a = new int[]{sc.nextInt(), sc.nextInt()};
            if (a[0] == 0 && a[1] == 0) {
                break;
            }
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < a[0]; i++) {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            }
            System.out.println(sb.toString());
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            int[] a = new int[]{sc.nextInt(), sc.nextInt()};
            if (a[0] == 0 && a[1] == 0) {
                break;
            }
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < a[0]; i++) {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            }
            System.out.println(sb.toString());
        }
    } main {
        Scanner sc = new Scanner(System.in);
        while (true) {
            int[] a = new int[]{sc.nextInt(), sc.nextInt()};
            if (a[0] == 0 && a[1] == 0) {
                break;
            }
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < a[0]; i++) {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            }
            System.out.println(sb.toString());
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (true) {
            int[] a = new int[]{sc.nextInt(), sc.nextInt()};
            if (a[0] == 0 && a[1] == 0) {
                break;
            }
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < a[0]; i++) {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            }
            System.out.println(sb.toString());
        } true {
            int[] a = new int[]{sc.nextInt(), sc.nextInt()};
            if (a[0] == 0 && a[1] == 0) {
                break;
            }
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < a[0]; i++) {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            }
            System.out.println(sb.toString());
        } int[] a = new int[]{sc.nextInt(), sc.nextInt()}; a new int[]{sc.nextInt(), sc.nextInt()} if (a[0] == 0 && a[1] == 0) {
                break;
            } a[0] == 0 && a[1] == 0 a[0] == 0 a[0] a 0 0 a[1] == 0 a[1] a 1 0 {
                break;
            } break; StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < a[0]; i++) {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            } int i = 0; int i = 0; i 0 i < a[0] i a[0] a 0 i++ i++ i {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            } {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            } for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                } int j = 0; int j = 0; j 0 j < a[1] j a[1] a 1 j++ j++ j {
                    sb.append("#");
                } {
                    sb.append("#");
                } sb.append("#") sb.append sb "#" sb.append("\n") sb.append sb "\n" System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            int[] a = new int[]{sc.nextInt(), sc.nextInt()};
            if (a[0] == 0 && a[1] == 0) {
                break;
            }
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < a[0]; i++) {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            }
            System.out.println(sb.toString());
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            int[] a = new int[]{sc.nextInt(), sc.nextInt()};
            if (a[0] == 0 && a[1] == 0) {
                break;
            }
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < a[0]; i++) {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            }
            System.out.println(sb.toString());
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            int[] a = new int[]{sc.nextInt(), sc.nextInt()};
            if (a[0] == 0 && a[1] == 0) {
                break;
            }
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < a[0]; i++) {
                for (int j = 0; j < a[1]; j++) {
                    sb.append("#");
                }
                sb.append("\n");
            }
            System.out.println(sb.toString());
        }
    }
}