import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        while(true){
        int h = input.nextInt();
        int w = input.nextInt();
        if(h==0&&w==0){
            break;
        }
        for(int n = 0; n < h; n++){
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        }
        System.out.println();
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        while(true){
        int h = input.nextInt();
        int w = input.nextInt();
        if(h==0&&w==0){
            break;
        }
        for(int n = 0; n < h; n++){
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        }
        System.out.println();
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        while(true){
        int h = input.nextInt();
        int w = input.nextInt();
        if(h==0&&w==0){
            break;
        }
        for(int n = 0; n < h; n++){
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        }
        System.out.println();
        }
    } main {
        Scanner input = new Scanner(System.in);
        while(true){
        int h = input.nextInt();
        int w = input.nextInt();
        if(h==0&&w==0){
            break;
        }
        for(int n = 0; n < h; n++){
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        }
        System.out.println();
        }
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) while(true){
        int h = input.nextInt();
        int w = input.nextInt();
        if(h==0&&w==0){
            break;
        }
        for(int n = 0; n < h; n++){
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        }
        System.out.println();
        } true {
        int h = input.nextInt();
        int w = input.nextInt();
        if(h==0&&w==0){
            break;
        }
        for(int n = 0; n < h; n++){
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        }
        System.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;
        } break; for(int n = 0; n < h; n++){
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        } int n = 0; int n = 0; n 0 n < h n h n++ n++ n {
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        } {
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        } for(int i = 0; i < w; i++){
            System.out.print("#");
        } int i = 0; int i = 0; i 0 i < w i w i++ i++ i {
            System.out.print("#");
        } {
            System.out.print("#");
        } System.out.print("#") System.out.print System.out System System.out "#" System.out.println() System.out.println System.out System System.out System.out.println() System.out.println System.out System System.out String[] args args public class Main {

    public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        while(true){
        int h = input.nextInt();
        int w = input.nextInt();
        if(h==0&&w==0){
            break;
        }
        for(int n = 0; n < h; n++){
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        }
        System.out.println();
        }
    }
} public class Main {

    public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        while(true){
        int h = input.nextInt();
        int w = input.nextInt();
        if(h==0&&w==0){
            break;
        }
        for(int n = 0; n < h; n++){
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        }
        System.out.println();
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        while(true){
        int h = input.nextInt();
        int w = input.nextInt();
        if(h==0&&w==0){
            break;
        }
        for(int n = 0; n < h; n++){
        for(int i = 0; i < w; i++){
            System.out.print("#");
        }
        System.out.println();
        }
        System.out.println();
        }
    }
}