import java.io.*;
import java.util.*;

public class Main
{
	public static void main(String[] args)
	{
		int[] h = new int[300];
		int[] w = new int[300];
		Scanner sc = new Scanner(System.in);
		int count=0,i=0,j=0,k=0;
		while(true)
		{
			h[count] = sc.nextInt();
			w[count] = sc.nextInt();
			if((h[count]==0)&&(w[count]==0))break;
			count++;
		}
		for(i=0;i<count;i++)
		{
			for(j=0;j<h[i];j++)
			{
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main
{
	public static void main(String[] args)
	{
		int[] h = new int[300];
		int[] w = new int[300];
		Scanner sc = new Scanner(System.in);
		int count=0,i=0,j=0,k=0;
		while(true)
		{
			h[count] = sc.nextInt();
			w[count] = sc.nextInt();
			if((h[count]==0)&&(w[count]==0))break;
			count++;
		}
		for(i=0;i<count;i++)
		{
			for(j=0;j<h[i];j++)
			{
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
		}
	}
} Main public static void main(String[] args)
	{
		int[] h = new int[300];
		int[] w = new int[300];
		Scanner sc = new Scanner(System.in);
		int count=0,i=0,j=0,k=0;
		while(true)
		{
			h[count] = sc.nextInt();
			w[count] = sc.nextInt();
			if((h[count]==0)&&(w[count]==0))break;
			count++;
		}
		for(i=0;i<count;i++)
		{
			for(j=0;j<h[i];j++)
			{
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
		}
	} main {
		int[] h = new int[300];
		int[] w = new int[300];
		Scanner sc = new Scanner(System.in);
		int count=0,i=0,j=0,k=0;
		while(true)
		{
			h[count] = sc.nextInt();
			w[count] = sc.nextInt();
			if((h[count]==0)&&(w[count]==0))break;
			count++;
		}
		for(i=0;i<count;i++)
		{
			for(j=0;j<h[i];j++)
			{
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
		}
	} int[] h = new int[300]; h new int[300] 300 int[] w = new int[300]; w new int[300] 300 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int count=0 count 0 i=0 i 0 j=0 j 0 k=0; k 0 while(true)
		{
			h[count] = sc.nextInt();
			w[count] = sc.nextInt();
			if((h[count]==0)&&(w[count]==0))break;
			count++;
		} true {
			h[count] = sc.nextInt();
			w[count] = sc.nextInt();
			if((h[count]==0)&&(w[count]==0))break;
			count++;
		} h[count] = sc.nextInt() h[count] h count sc.nextInt() sc.nextInt sc w[count] = sc.nextInt() w[count] w count sc.nextInt() sc.nextInt sc if((h[count]==0)&&(w[count]==0))break; (h[count]==0)&&(w[count]==0) (h[count]==0) h[count] h count 0 (w[count]==0) w[count] w count 0 break; count++ count for(i=0;i<count;i++)
		{
			for(j=0;j<h[i];j++)
			{
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
		} i=0; i=0 i 0 i<count i count i++ i++ i {
			for(j=0;j<h[i];j++)
			{
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
		} {
			for(j=0;j<h[i];j++)
			{
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
		} for(j=0;j<h[i];j++)
			{
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			} j=0; j=0 j 0 j<h[i] j h[i] h i j++ j++ j {
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			} {
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			} for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				} k=0; k=0 k 0 k<w[i] k w[i] w i k++ k++ k {
					System.out.printf("#");
				} {
					System.out.printf("#");
				} System.out.printf("#") System.out.printf System.out System System.out "#" System.out.printf("\n") System.out.printf System.out System System.out "\n" System.out.printf("\n") System.out.printf System.out System System.out "\n" String[] args args public class Main
{
	public static void main(String[] args)
	{
		int[] h = new int[300];
		int[] w = new int[300];
		Scanner sc = new Scanner(System.in);
		int count=0,i=0,j=0,k=0;
		while(true)
		{
			h[count] = sc.nextInt();
			w[count] = sc.nextInt();
			if((h[count]==0)&&(w[count]==0))break;
			count++;
		}
		for(i=0;i<count;i++)
		{
			for(j=0;j<h[i];j++)
			{
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
		}
	}
} public class Main
{
	public static void main(String[] args)
	{
		int[] h = new int[300];
		int[] w = new int[300];
		Scanner sc = new Scanner(System.in);
		int count=0,i=0,j=0,k=0;
		while(true)
		{
			h[count] = sc.nextInt();
			w[count] = sc.nextInt();
			if((h[count]==0)&&(w[count]==0))break;
			count++;
		}
		for(i=0;i<count;i++)
		{
			for(j=0;j<h[i];j++)
			{
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
		}
	}
} Main
import java.io.*;
import java.util.*;

public class Main
{
	public static void main(String[] args)
	{
		int[] h = new int[300];
		int[] w = new int[300];
		Scanner sc = new Scanner(System.in);
		int count=0,i=0,j=0,k=0;
		while(true)
		{
			h[count] = sc.nextInt();
			w[count] = sc.nextInt();
			if((h[count]==0)&&(w[count]==0))break;
			count++;
		}
		for(i=0;i<count;i++)
		{
			for(j=0;j<h[i];j++)
			{
				for(k=0;k<w[i];k++)
				{
					System.out.printf("#");
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
		}
	}
}