import java.util.Scanner;

public class Main {
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int height = scan.nextInt();
		int width = scan.nextInt();
		
		while(height != 0 || height != 0)
		{
			for(int i = 0;i < height;i++)
			{
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
			height = scan.nextInt();
			width = scan.nextInt();
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int height = scan.nextInt();
		int width = scan.nextInt();
		
		while(height != 0 || height != 0)
		{
			for(int i = 0;i < height;i++)
			{
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
			height = scan.nextInt();
			width = scan.nextInt();
		}
	}
} Main public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int height = scan.nextInt();
		int width = scan.nextInt();
		
		while(height != 0 || height != 0)
		{
			for(int i = 0;i < height;i++)
			{
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
			height = scan.nextInt();
			width = scan.nextInt();
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int height = scan.nextInt();
		int width = scan.nextInt();
		
		while(height != 0 || height != 0)
		{
			for(int i = 0;i < height;i++)
			{
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
			height = scan.nextInt();
			width = scan.nextInt();
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int height = scan.nextInt(); height scan.nextInt() scan.nextInt scan int width = scan.nextInt(); width scan.nextInt() scan.nextInt scan while(height != 0 || height != 0)
		{
			for(int i = 0;i < height;i++)
			{
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
			height = scan.nextInt();
			width = scan.nextInt();
		} height != 0 || height != 0 height != 0 height 0 height != 0 height 0 {
			for(int i = 0;i < height;i++)
			{
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
			height = scan.nextInt();
			width = scan.nextInt();
		} for(int i = 0;i < height;i++)
			{
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			} int i = 0; int i = 0; i 0 i < height i height i++ i++ i {
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			} {
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			} for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				} int j = 0; int j = 0; j 0 j < width j width j++ j++ j {
					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 "" height = scan.nextInt() height scan.nextInt() scan.nextInt scan width = scan.nextInt() width scan.nextInt() scan.nextInt scan String[] args args public class Main {
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int height = scan.nextInt();
		int width = scan.nextInt();
		
		while(height != 0 || height != 0)
		{
			for(int i = 0;i < height;i++)
			{
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
			height = scan.nextInt();
			width = scan.nextInt();
		}
	}
} public class Main {
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int height = scan.nextInt();
		int width = scan.nextInt();
		
		while(height != 0 || height != 0)
		{
			for(int i = 0;i < height;i++)
			{
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
			height = scan.nextInt();
			width = scan.nextInt();
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int height = scan.nextInt();
		int width = scan.nextInt();
		
		while(height != 0 || height != 0)
		{
			for(int i = 0;i < height;i++)
			{
				for(int j = 0;j < width;j++)
				{
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
			height = scan.nextInt();
			width = scan.nextInt();
		}
	}
}