import java.util.Scanner;

class Main{

	public static void main(String[] args) {
		
		int height = 0;
		int width = 0;
		
		Scanner sc = new Scanner(System.in);
		
		for(;;){
			
			String line = sc.nextLine();
			String[] array = line.split(" ");
			
			height = Integer.parseInt(array[0]);
			width = Integer.parseInt(array[1]);
			
			if(height == 0 && width == 0){
				sc.close();
				break;
			}
			else{
				for(int rowIndex = 0; rowIndex < height; rowIndex++ ){
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				}
				System.out.println();
			}
		}
		

	}

} import java.util.Scanner; Scanner java.util class Main{

	public static void main(String[] args) {
		
		int height = 0;
		int width = 0;
		
		Scanner sc = new Scanner(System.in);
		
		for(;;){
			
			String line = sc.nextLine();
			String[] array = line.split(" ");
			
			height = Integer.parseInt(array[0]);
			width = Integer.parseInt(array[1]);
			
			if(height == 0 && width == 0){
				sc.close();
				break;
			}
			else{
				for(int rowIndex = 0; rowIndex < height; rowIndex++ ){
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				}
				System.out.println();
			}
		}
		

	}

} Main public static void main(String[] args) {
		
		int height = 0;
		int width = 0;
		
		Scanner sc = new Scanner(System.in);
		
		for(;;){
			
			String line = sc.nextLine();
			String[] array = line.split(" ");
			
			height = Integer.parseInt(array[0]);
			width = Integer.parseInt(array[1]);
			
			if(height == 0 && width == 0){
				sc.close();
				break;
			}
			else{
				for(int rowIndex = 0; rowIndex < height; rowIndex++ ){
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				}
				System.out.println();
			}
		}
		

	} main {
		
		int height = 0;
		int width = 0;
		
		Scanner sc = new Scanner(System.in);
		
		for(;;){
			
			String line = sc.nextLine();
			String[] array = line.split(" ");
			
			height = Integer.parseInt(array[0]);
			width = Integer.parseInt(array[1]);
			
			if(height == 0 && width == 0){
				sc.close();
				break;
			}
			else{
				for(int rowIndex = 0; rowIndex < height; rowIndex++ ){
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				}
				System.out.println();
			}
		}
		

	} int height = 0; height 0 int width = 0; width 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for(;;){
			
			String line = sc.nextLine();
			String[] array = line.split(" ");
			
			height = Integer.parseInt(array[0]);
			width = Integer.parseInt(array[1]);
			
			if(height == 0 && width == 0){
				sc.close();
				break;
			}
			else{
				for(int rowIndex = 0; rowIndex < height; rowIndex++ ){
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				}
				System.out.println();
			}
		} ; {
			
			String line = sc.nextLine();
			String[] array = line.split(" ");
			
			height = Integer.parseInt(array[0]);
			width = Integer.parseInt(array[1]);
			
			if(height == 0 && width == 0){
				sc.close();
				break;
			}
			else{
				for(int rowIndex = 0; rowIndex < height; rowIndex++ ){
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				}
				System.out.println();
			}
		} {
			
			String line = sc.nextLine();
			String[] array = line.split(" ");
			
			height = Integer.parseInt(array[0]);
			width = Integer.parseInt(array[1]);
			
			if(height == 0 && width == 0){
				sc.close();
				break;
			}
			else{
				for(int rowIndex = 0; rowIndex < height; rowIndex++ ){
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				}
				System.out.println();
			}
		} String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] array = line.split(" "); array line.split(" ") line.split line " " height = Integer.parseInt(array[0]) height Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 width = Integer.parseInt(array[1]) width Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 if(height == 0 && width == 0){
				sc.close();
				break;
			}
			else{
				for(int rowIndex = 0; rowIndex < height; rowIndex++ ){
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				}
				System.out.println();
			} height == 0 && width == 0 height == 0 height 0 width == 0 width 0 {
				sc.close();
				break;
			} sc.close() sc.close sc break; {
				for(int rowIndex = 0; rowIndex < height; rowIndex++ ){
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				}
				System.out.println();
			} for(int rowIndex = 0; rowIndex < height; rowIndex++ ){
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				} int rowIndex = 0; int rowIndex = 0; rowIndex 0 rowIndex < height rowIndex height rowIndex++ rowIndex++ rowIndex {
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				} {
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				} for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					} int columnIndex = 0; int columnIndex = 0; columnIndex 0 columnIndex < width columnIndex width columnIndex++ columnIndex++ columnIndex {
						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
import java.util.Scanner;

class Main{

	public static void main(String[] args) {
		
		int height = 0;
		int width = 0;
		
		Scanner sc = new Scanner(System.in);
		
		for(;;){
			
			String line = sc.nextLine();
			String[] array = line.split(" ");
			
			height = Integer.parseInt(array[0]);
			width = Integer.parseInt(array[1]);
			
			if(height == 0 && width == 0){
				sc.close();
				break;
			}
			else{
				for(int rowIndex = 0; rowIndex < height; rowIndex++ ){
					for(int columnIndex = 0; columnIndex < width; columnIndex++){
						System.out.print("#");
					}
					System.out.println();
				}
				System.out.println();
			}
		}
		

	}

}