import java.util.Scanner;
class Main
{
	public static void main(String[] args)throws Exception
	{
		Scanner scan=new Scanner(System.in);
		
		while(true)
		{
			int H=scan.nextInt();		
			int W=scan.nextInt();

			if(H==0&&W==0)
			{
				break;				
			}
			else
			{
				for(int i=1;i<=H;i++)
				{	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				}
			}
			System.out.print("\n");
		}
		
	}

} import java.util.Scanner; Scanner java.util class Main
{
	public static void main(String[] args)throws Exception
	{
		Scanner scan=new Scanner(System.in);
		
		while(true)
		{
			int H=scan.nextInt();		
			int W=scan.nextInt();

			if(H==0&&W==0)
			{
				break;				
			}
			else
			{
				for(int i=1;i<=H;i++)
				{	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				}
			}
			System.out.print("\n");
		}
		
	}

} Main public static void main(String[] args)throws Exception
	{
		Scanner scan=new Scanner(System.in);
		
		while(true)
		{
			int H=scan.nextInt();		
			int W=scan.nextInt();

			if(H==0&&W==0)
			{
				break;				
			}
			else
			{
				for(int i=1;i<=H;i++)
				{	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				}
			}
			System.out.print("\n");
		}
		
	} main {
		Scanner scan=new Scanner(System.in);
		
		while(true)
		{
			int H=scan.nextInt();		
			int W=scan.nextInt();

			if(H==0&&W==0)
			{
				break;				
			}
			else
			{
				for(int i=1;i<=H;i++)
				{	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				}
			}
			System.out.print("\n");
		}
		
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) while(true)
		{
			int H=scan.nextInt();		
			int W=scan.nextInt();

			if(H==0&&W==0)
			{
				break;				
			}
			else
			{
				for(int i=1;i<=H;i++)
				{	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				}
			}
			System.out.print("\n");
		} true {
			int H=scan.nextInt();		
			int W=scan.nextInt();

			if(H==0&&W==0)
			{
				break;				
			}
			else
			{
				for(int i=1;i<=H;i++)
				{	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				}
			}
			System.out.print("\n");
		} int H=scan.nextInt(); H scan.nextInt() scan.nextInt scan int W=scan.nextInt(); W scan.nextInt() scan.nextInt scan if(H==0&&W==0)
			{
				break;				
			}
			else
			{
				for(int i=1;i<=H;i++)
				{	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				}
			} H==0&&W==0 H==0 H 0 W==0 W 0 {
				break;				
			} break; {
				for(int i=1;i<=H;i++)
				{	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				}
			} for(int i=1;i<=H;i++)
				{	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				} int i=1; int i=1; i 1 i<=H i H i++ i++ i {	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				} {	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				} for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					} int x=1; int x=1; x 1 x<=W x W x++ x++ x {
						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.print("\n") System.out.print System.out System System.out "\n" String[] args args
import java.util.Scanner;
class Main
{
	public static void main(String[] args)throws Exception
	{
		Scanner scan=new Scanner(System.in);
		
		while(true)
		{
			int H=scan.nextInt();		
			int W=scan.nextInt();

			if(H==0&&W==0)
			{
				break;				
			}
			else
			{
				for(int i=1;i<=H;i++)
				{	
					for(int x=1;x<=W;x++)
					{
						System.out.print("#");
					}
					System.out.println("");
				}
			}
			System.out.print("\n");
		}
		
	}

}