import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args)throws Exception {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        while(true){
        	String[] input = br.readLine().split(" ");
        	int H = Integer.parseInt(input[0]);
        	int W = Integer.parseInt(input[1]);
        	if(H == 0 && W == 0){
        		break;
        	}
        	for(int x = 0 ; x < H ; x++){
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	}
        	System.out.println();
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args)throws Exception {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        while(true){
        	String[] input = br.readLine().split(" ");
        	int H = Integer.parseInt(input[0]);
        	int W = Integer.parseInt(input[1]);
        	if(H == 0 && W == 0){
        		break;
        	}
        	for(int x = 0 ; x < H ; x++){
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	}
        	System.out.println();
        }
    }
} Main public static void main(String[] args)throws Exception {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        while(true){
        	String[] input = br.readLine().split(" ");
        	int H = Integer.parseInt(input[0]);
        	int W = Integer.parseInt(input[1]);
        	if(H == 0 && W == 0){
        		break;
        	}
        	for(int x = 0 ; x < H ; x++){
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	}
        	System.out.println();
        }
    } main {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        while(true){
        	String[] input = br.readLine().split(" ");
        	int H = Integer.parseInt(input[0]);
        	int W = Integer.parseInt(input[1]);
        	if(H == 0 && W == 0){
        		break;
        	}
        	for(int x = 0 ; x < H ; x++){
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	}
        	System.out.println();
        }
    } InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) while(true){
        	String[] input = br.readLine().split(" ");
        	int H = Integer.parseInt(input[0]);
        	int W = Integer.parseInt(input[1]);
        	if(H == 0 && W == 0){
        		break;
        	}
        	for(int x = 0 ; x < H ; x++){
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	}
        	System.out.println();
        } true {
        	String[] input = br.readLine().split(" ");
        	int H = Integer.parseInt(input[0]);
        	int W = Integer.parseInt(input[1]);
        	if(H == 0 && W == 0){
        		break;
        	}
        	for(int x = 0 ; x < H ; x++){
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	}
        	System.out.println();
        } String[] input = br.readLine().split(" "); input br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int H = Integer.parseInt(input[0]); H Integer.parseInt(input[0]) Integer.parseInt Integer input[0] input 0 int W = Integer.parseInt(input[1]); W Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 if(H == 0 && W == 0){
        		break;
        	} H == 0 && W == 0 H == 0 H 0 W == 0 W 0 {
        		break;
        	} break; for(int x = 0 ; x < H ; x++){
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	} int x = 0 ; int x = 0 ; x 0 x < H x H x++ x++ x {
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	} {
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	} for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		} int y = 0; int y = 0; y 0 y < W y W y++ y++ y {
        			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 {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        while(true){
        	String[] input = br.readLine().split(" ");
        	int H = Integer.parseInt(input[0]);
        	int W = Integer.parseInt(input[1]);
        	if(H == 0 && W == 0){
        		break;
        	}
        	for(int x = 0 ; x < H ; x++){
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	}
        	System.out.println();
        }
    }
} public class Main {
    public static void main(String[] args)throws Exception {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        while(true){
        	String[] input = br.readLine().split(" ");
        	int H = Integer.parseInt(input[0]);
        	int W = Integer.parseInt(input[1]);
        	if(H == 0 && W == 0){
        		break;
        	}
        	for(int x = 0 ; x < H ; x++){
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	}
        	System.out.println();
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args)throws Exception {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        while(true){
        	String[] input = br.readLine().split(" ");
        	int H = Integer.parseInt(input[0]);
        	int W = Integer.parseInt(input[1]);
        	if(H == 0 && W == 0){
        		break;
        	}
        	for(int x = 0 ; x < H ; x++){
        		for(int y = 0; y < W ; y++){
        			System.out.print("#");
        		}
        		System.out.println();
        	}
        	System.out.println();
        }
    }
}