import java.io.*;

class Main{

    public static void main(String[] args)throws IOException{

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	while(true){
	    String input = br.readLine();
	    String[] div = input.split(" ");
	    int height = Integer.parseInt(div[0]);
	    int width = Integer.parseInt(div[1]);

	    if(height == 0 && width == 0){
		break;
	    }
	    
	    for(int i = 0; i < height; i++){
		for(int j = 0; j < width; j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");
	    }
	    System.out.printf("\n");
	    
	}
	

    }

} import java.io.*; io.* java class Main{

    public static void main(String[] args)throws IOException{

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	while(true){
	    String input = br.readLine();
	    String[] div = input.split(" ");
	    int height = Integer.parseInt(div[0]);
	    int width = Integer.parseInt(div[1]);

	    if(height == 0 && width == 0){
		break;
	    }
	    
	    for(int i = 0; i < height; i++){
		for(int j = 0; j < width; j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");
	    }
	    System.out.printf("\n");
	    
	}
	

    }

} Main public static void main(String[] args)throws IOException{

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	while(true){
	    String input = br.readLine();
	    String[] div = input.split(" ");
	    int height = Integer.parseInt(div[0]);
	    int width = Integer.parseInt(div[1]);

	    if(height == 0 && width == 0){
		break;
	    }
	    
	    for(int i = 0; i < height; i++){
		for(int j = 0; j < width; j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");
	    }
	    System.out.printf("\n");
	    
	}
	

    } main {

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	while(true){
	    String input = br.readLine();
	    String[] div = input.split(" ");
	    int height = Integer.parseInt(div[0]);
	    int width = Integer.parseInt(div[1]);

	    if(height == 0 && width == 0){
		break;
	    }
	    
	    for(int i = 0; i < height; i++){
		for(int j = 0; j < width; j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");
	    }
	    System.out.printf("\n");
	    
	}
	

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
	    String input = br.readLine();
	    String[] div = input.split(" ");
	    int height = Integer.parseInt(div[0]);
	    int width = Integer.parseInt(div[1]);

	    if(height == 0 && width == 0){
		break;
	    }
	    
	    for(int i = 0; i < height; i++){
		for(int j = 0; j < width; j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");
	    }
	    System.out.printf("\n");
	    
	} true {
	    String input = br.readLine();
	    String[] div = input.split(" ");
	    int height = Integer.parseInt(div[0]);
	    int width = Integer.parseInt(div[1]);

	    if(height == 0 && width == 0){
		break;
	    }
	    
	    for(int i = 0; i < height; i++){
		for(int j = 0; j < width; j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");
	    }
	    System.out.printf("\n");
	    
	} String input = br.readLine(); input br.readLine() br.readLine br String[] div = input.split(" "); div input.split(" ") input.split input " " int height = Integer.parseInt(div[0]); height Integer.parseInt(div[0]) Integer.parseInt Integer div[0] div 0 int width = Integer.parseInt(div[1]); width Integer.parseInt(div[1]) Integer.parseInt Integer div[1] div 1 if(height == 0 && width == 0){
		break;
	    } height == 0 && width == 0 height == 0 height 0 width == 0 width 0 {
		break;
	    } break; for(int i = 0; i < height; i++){
		for(int j = 0; j < width; j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");
	    } int i = 0; int i = 0; i 0 i < height i height i++ i++ i {
		for(int j = 0; j < width; j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");
	    } {
		for(int j = 0; j < width; j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");
	    } for(int j = 0; j < width; j++){
		    System.out.printf("#");
		} int j = 0; int j = 0; j 0 j < width j width j++ j++ j {
		    System.out.printf("#");
		} {
		    System.out.printf("#");
		} System.out.printf("#") System.out.printf System.out System System.out "#" System.out.printf("\n") System.out.printf System.out System System.out "\n" System.out.printf("\n") System.out.printf System.out System System.out "\n" String[] args args
import java.io.*;

class Main{

    public static void main(String[] args)throws IOException{

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	while(true){
	    String input = br.readLine();
	    String[] div = input.split(" ");
	    int height = Integer.parseInt(div[0]);
	    int width = Integer.parseInt(div[1]);

	    if(height == 0 && width == 0){
		break;
	    }
	    
	    for(int i = 0; i < height; i++){
		for(int j = 0; j < width; j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");
	    }
	    System.out.printf("\n");
	    
	}
	

    }

}