import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int H = scan.nextInt();
        int W = scan.nextInt();
        while(H!=0 && W !=0){
            int w = W;
            while(H != 0){
                while(w !=0){
                    System.out.print("#");
                    w--;
                }
                System.out.println("");
                H--;
                w = W;
            }
            H = scan.nextInt();
            W = scan.nextInt();
            System.out.println("");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int H = scan.nextInt();
        int W = scan.nextInt();
        while(H!=0 && W !=0){
            int w = W;
            while(H != 0){
                while(w !=0){
                    System.out.print("#");
                    w--;
                }
                System.out.println("");
                H--;
                w = W;
            }
            H = scan.nextInt();
            W = scan.nextInt();
            System.out.println("");
        }
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int H = scan.nextInt();
        int W = scan.nextInt();
        while(H!=0 && W !=0){
            int w = W;
            while(H != 0){
                while(w !=0){
                    System.out.print("#");
                    w--;
                }
                System.out.println("");
                H--;
                w = W;
            }
            H = scan.nextInt();
            W = scan.nextInt();
            System.out.println("");
        }
    } main {
        Scanner scan = new Scanner(System.in);
        int H = scan.nextInt();
        int W = scan.nextInt();
        while(H!=0 && W !=0){
            int w = W;
            while(H != 0){
                while(w !=0){
                    System.out.print("#");
                    w--;
                }
                System.out.println("");
                H--;
                w = W;
            }
            H = scan.nextInt();
            W = scan.nextInt();
            System.out.println("");
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int H = scan.nextInt(); H scan.nextInt() scan.nextInt scan int W = scan.nextInt(); W scan.nextInt() scan.nextInt scan while(H!=0 && W !=0){
            int w = W;
            while(H != 0){
                while(w !=0){
                    System.out.print("#");
                    w--;
                }
                System.out.println("");
                H--;
                w = W;
            }
            H = scan.nextInt();
            W = scan.nextInt();
            System.out.println("");
        } H!=0 && W !=0 H!=0 H 0 W !=0 W 0 {
            int w = W;
            while(H != 0){
                while(w !=0){
                    System.out.print("#");
                    w--;
                }
                System.out.println("");
                H--;
                w = W;
            }
            H = scan.nextInt();
            W = scan.nextInt();
            System.out.println("");
        } int w = W; w W while(H != 0){
                while(w !=0){
                    System.out.print("#");
                    w--;
                }
                System.out.println("");
                H--;
                w = W;
            } H != 0 H 0 {
                while(w !=0){
                    System.out.print("#");
                    w--;
                }
                System.out.println("");
                H--;
                w = W;
            } while(w !=0){
                    System.out.print("#");
                    w--;
                } w !=0 w 0 {
                    System.out.print("#");
                    w--;
                } System.out.print("#") System.out.print System.out System System.out "#" w-- w System.out.println("") System.out.println System.out System System.out "" H-- H w = W w W H = scan.nextInt() H scan.nextInt() scan.nextInt scan W = scan.nextInt() W scan.nextInt() scan.nextInt scan System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int H = scan.nextInt();
        int W = scan.nextInt();
        while(H!=0 && W !=0){
            int w = W;
            while(H != 0){
                while(w !=0){
                    System.out.print("#");
                    w--;
                }
                System.out.println("");
                H--;
                w = W;
            }
            H = scan.nextInt();
            W = scan.nextInt();
            System.out.println("");
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int H = scan.nextInt();
        int W = scan.nextInt();
        while(H!=0 && W !=0){
            int w = W;
            while(H != 0){
                while(w !=0){
                    System.out.print("#");
                    w--;
                }
                System.out.println("");
                H--;
                w = W;
            }
            H = scan.nextInt();
            W = scan.nextInt();
            System.out.println("");
        }
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int H = scan.nextInt();
        int W = scan.nextInt();
        while(H!=0 && W !=0){
            int w = W;
            while(H != 0){
                while(w !=0){
                    System.out.print("#");
                    w--;
                }
                System.out.println("");
                H--;
                w = W;
            }
            H = scan.nextInt();
            W = scan.nextInt();
            System.out.println("");
        }
    }
}
