import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;


class Main {

	public static void main(String[] args) {
	
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
         
        int H,W;
         
        while(true){
            H = sc.nextInt();
            W = sc.nextInt();
             
            if(H == 0 && W == 0)
                break;
             
            x.add(H);
            y.add(W);
             
        }
        
        int countH = 0;
        int countW = 0;

        for(countH = 0; countH < x.size(); countH++){
        	
        	for(int i = 0; i < x.get(countH); i++)
            {
            	for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	}
            }
        	
        	System.out.println("");
        	countW++;
        }

		
		
		
	}

} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util class Main {

	public static void main(String[] args) {
	
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
         
        int H,W;
         
        while(true){
            H = sc.nextInt();
            W = sc.nextInt();
             
            if(H == 0 && W == 0)
                break;
             
            x.add(H);
            y.add(W);
             
        }
        
        int countH = 0;
        int countW = 0;

        for(countH = 0; countH < x.size(); countH++){
        	
        	for(int i = 0; i < x.get(countH); i++)
            {
            	for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	}
            }
        	
        	System.out.println("");
        	countW++;
        }

		
		
		
	}

} Main public static void main(String[] args) {
	
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
         
        int H,W;
         
        while(true){
            H = sc.nextInt();
            W = sc.nextInt();
             
            if(H == 0 && W == 0)
                break;
             
            x.add(H);
            y.add(W);
             
        }
        
        int countH = 0;
        int countW = 0;

        for(countH = 0; countH < x.size(); countH++){
        	
        	for(int i = 0; i < x.get(countH); i++)
            {
            	for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	}
            }
        	
        	System.out.println("");
        	countW++;
        }

		
		
		
	} main {
	
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
         
        int H,W;
         
        while(true){
            H = sc.nextInt();
            W = sc.nextInt();
             
            if(H == 0 && W == 0)
                break;
             
            x.add(H);
            y.add(W);
             
        }
        
        int countH = 0;
        int countW = 0;

        for(countH = 0; countH < x.size(); countH++){
        	
        	for(int i = 0; i < x.get(countH); i++)
            {
            	for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	}
            }
        	
        	System.out.println("");
        	countW++;
        }

		
		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Integer> x = new ArrayList<Integer>(); x new ArrayList<Integer>() ArrayList<Integer> y = new ArrayList<Integer>(); y new ArrayList<Integer>() int H H W; W while(true){
            H = sc.nextInt();
            W = sc.nextInt();
             
            if(H == 0 && W == 0)
                break;
             
            x.add(H);
            y.add(W);
             
        } true {
            H = sc.nextInt();
            W = sc.nextInt();
             
            if(H == 0 && W == 0)
                break;
             
            x.add(H);
            y.add(W);
             
        } H = sc.nextInt() H sc.nextInt() sc.nextInt sc W = sc.nextInt() W sc.nextInt() sc.nextInt sc if(H == 0 && W == 0)
                break; H == 0 && W == 0 H == 0 H 0 W == 0 W 0 break; x.add(H) x.add x H y.add(W) y.add y W int countH = 0; countH 0 int countW = 0; countW 0 for(countH = 0; countH < x.size(); countH++){
        	
        	for(int i = 0; i < x.get(countH); i++)
            {
            	for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	}
            }
        	
        	System.out.println("");
        	countW++;
        } countH = 0; countH = 0 countH 0 countH < x.size() countH x.size() x.size x countH++ countH++ countH {
        	
        	for(int i = 0; i < x.get(countH); i++)
            {
            	for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	}
            }
        	
        	System.out.println("");
        	countW++;
        } {
        	
        	for(int i = 0; i < x.get(countH); i++)
            {
            	for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	}
            }
        	
        	System.out.println("");
        	countW++;
        } for(int i = 0; i < x.get(countH); i++)
            {
            	for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	}
            } int i = 0; int i = 0; i 0 i < x.get(countH) i x.get(countH) x.get x countH i++ i++ i {
            	for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	}
            } {
            	for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	}
            } for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	} int t = 0; int t = 0; t 0 t < y.get(countW) t y.get(countW) y.get y countW t++ t++ t {
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	} {
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	} if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		} t < y.get(countW) -1 t y.get(countW) -1 y.get(countW) y.get y countW 1 {
            			System.out.print("#");
            		} System.out.print("#") System.out.print System.out System System.out "#" if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		} t == y.get(countW) -1 t y.get(countW) -1 y.get(countW) y.get y countW 1 {
            			System.out.println("#");
            		} System.out.println("#") System.out.println System.out System System.out "#" System.out.println("") System.out.println System.out System System.out "" countW++ countW String[] args args
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;


class Main {

	public static void main(String[] args) {
	
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> x = new ArrayList<Integer>();
        ArrayList<Integer> y = new ArrayList<Integer>();
         
        int H,W;
         
        while(true){
            H = sc.nextInt();
            W = sc.nextInt();
             
            if(H == 0 && W == 0)
                break;
             
            x.add(H);
            y.add(W);
             
        }
        
        int countH = 0;
        int countW = 0;

        for(countH = 0; countH < x.size(); countH++){
        	
        	for(int i = 0; i < x.get(countH); i++)
            {
            	for(int t = 0; t < y.get(countW); t++)
            	{
            		if(t < y.get(countW) -1)
            		{
            			System.out.print("#");
            		}
            		else if(t == y.get(countW) -1)
            		{
            			System.out.println("#");
            		}
            	}
            }
        	
        	System.out.println("");
        	countW++;
        }

		
		
		
	}

}