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

public class Main{
	public static void main(String[] args) throws IOException{

		int[] H = new int[1000];
		int[] W = new int[1000];
		String[] Buffer = new String[10];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;

		for(int n = 0; n<1000; n++){
			Buffer = br.readLine().split(" ");
			H[n] = Integer.parseInt(Buffer[0]);
			W[n] = Integer.parseInt(Buffer[1]);
			//System.out.println("your input is: "+n+" "+H[n]+" "+W[n]);
			if(H[n]==0 && W[n]==0){
				n = 1000;
			}
		}
		
 		int k = 0;
 		while(H[k]!=0 && W[k]!=0){
 			for(int n = 0; n< H[k]; n++){
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			}
 			k++;
 			System.out.print("\n");
 		}

	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main{
	public static void main(String[] args) throws IOException{

		int[] H = new int[1000];
		int[] W = new int[1000];
		String[] Buffer = new String[10];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;

		for(int n = 0; n<1000; n++){
			Buffer = br.readLine().split(" ");
			H[n] = Integer.parseInt(Buffer[0]);
			W[n] = Integer.parseInt(Buffer[1]);
			//System.out.println("your input is: "+n+" "+H[n]+" "+W[n]);
			if(H[n]==0 && W[n]==0){
				n = 1000;
			}
		}
		
 		int k = 0;
 		while(H[k]!=0 && W[k]!=0){
 			for(int n = 0; n< H[k]; n++){
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			}
 			k++;
 			System.out.print("\n");
 		}

	}
} Main public static void main(String[] args) throws IOException{

		int[] H = new int[1000];
		int[] W = new int[1000];
		String[] Buffer = new String[10];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;

		for(int n = 0; n<1000; n++){
			Buffer = br.readLine().split(" ");
			H[n] = Integer.parseInt(Buffer[0]);
			W[n] = Integer.parseInt(Buffer[1]);
			//System.out.println("your input is: "+n+" "+H[n]+" "+W[n]);
			if(H[n]==0 && W[n]==0){
				n = 1000;
			}
		}
		
 		int k = 0;
 		while(H[k]!=0 && W[k]!=0){
 			for(int n = 0; n< H[k]; n++){
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			}
 			k++;
 			System.out.print("\n");
 		}

	} main {

		int[] H = new int[1000];
		int[] W = new int[1000];
		String[] Buffer = new String[10];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;

		for(int n = 0; n<1000; n++){
			Buffer = br.readLine().split(" ");
			H[n] = Integer.parseInt(Buffer[0]);
			W[n] = Integer.parseInt(Buffer[1]);
			//System.out.println("your input is: "+n+" "+H[n]+" "+W[n]);
			if(H[n]==0 && W[n]==0){
				n = 1000;
			}
		}
		
 		int k = 0;
 		while(H[k]!=0 && W[k]!=0){
 			for(int n = 0; n< H[k]; n++){
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			}
 			k++;
 			System.out.print("\n");
 		}

	} int[] H = new int[1000]; H new int[1000] 1000 int[] W = new int[1000]; W new int[1000] 1000 String[] Buffer = new String[10]; Buffer new String[10] 10 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str for(int n = 0; n<1000; n++){
			Buffer = br.readLine().split(" ");
			H[n] = Integer.parseInt(Buffer[0]);
			W[n] = Integer.parseInt(Buffer[1]);
			//System.out.println("your input is: "+n+" "+H[n]+" "+W[n]);
			if(H[n]==0 && W[n]==0){
				n = 1000;
			}
		} int n = 0; int n = 0; n 0 n<1000 n 1000 n++ n++ n {
			Buffer = br.readLine().split(" ");
			H[n] = Integer.parseInt(Buffer[0]);
			W[n] = Integer.parseInt(Buffer[1]);
			//System.out.println("your input is: "+n+" "+H[n]+" "+W[n]);
			if(H[n]==0 && W[n]==0){
				n = 1000;
			}
		} {
			Buffer = br.readLine().split(" ");
			H[n] = Integer.parseInt(Buffer[0]);
			W[n] = Integer.parseInt(Buffer[1]);
			//System.out.println("your input is: "+n+" "+H[n]+" "+W[n]);
			if(H[n]==0 && W[n]==0){
				n = 1000;
			}
		} Buffer = br.readLine().split(" ") Buffer br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " H[n] = Integer.parseInt(Buffer[0]) H[n] H n Integer.parseInt(Buffer[0]) Integer.parseInt Integer Buffer[0] Buffer 0 W[n] = Integer.parseInt(Buffer[1]) W[n] W n Integer.parseInt(Buffer[1]) Integer.parseInt Integer Buffer[1] Buffer 1 if(H[n]==0 && W[n]==0){
				n = 1000;
			} H[n]==0 && W[n]==0 H[n]==0 H[n] H n 0 W[n]==0 W[n] W n 0 {
				n = 1000;
			} n = 1000 n 1000 int k = 0; k 0 while(H[k]!=0 && W[k]!=0){
 			for(int n = 0; n< H[k]; n++){
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			}
 			k++;
 			System.out.print("\n");
 		} H[k]!=0 && W[k]!=0 H[k]!=0 H[k] H k 0 W[k]!=0 W[k] W k 0 {
 			for(int n = 0; n< H[k]; n++){
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			}
 			k++;
 			System.out.print("\n");
 		} for(int n = 0; n< H[k]; n++){
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			} int n = 0; int n = 0; n 0 n< H[k] n H[k] H k n++ n++ n {
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			} {
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			} for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				} int m = 0; int m = 0; m 0 m< W[k] m W[k] W k m++ m++ m {
 					System.out.print("#");
 				} {
 					System.out.print("#");
 				} System.out.print("#") System.out.print System.out System System.out "#" System.out.print("\n") System.out.print System.out System System.out "\n" k++ k System.out.print("\n") System.out.print System.out System System.out "\n" String[] args args public class Main{
	public static void main(String[] args) throws IOException{

		int[] H = new int[1000];
		int[] W = new int[1000];
		String[] Buffer = new String[10];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;

		for(int n = 0; n<1000; n++){
			Buffer = br.readLine().split(" ");
			H[n] = Integer.parseInt(Buffer[0]);
			W[n] = Integer.parseInt(Buffer[1]);
			//System.out.println("your input is: "+n+" "+H[n]+" "+W[n]);
			if(H[n]==0 && W[n]==0){
				n = 1000;
			}
		}
		
 		int k = 0;
 		while(H[k]!=0 && W[k]!=0){
 			for(int n = 0; n< H[k]; n++){
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			}
 			k++;
 			System.out.print("\n");
 		}

	}
} public class Main{
	public static void main(String[] args) throws IOException{

		int[] H = new int[1000];
		int[] W = new int[1000];
		String[] Buffer = new String[10];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;

		for(int n = 0; n<1000; n++){
			Buffer = br.readLine().split(" ");
			H[n] = Integer.parseInt(Buffer[0]);
			W[n] = Integer.parseInt(Buffer[1]);
			//System.out.println("your input is: "+n+" "+H[n]+" "+W[n]);
			if(H[n]==0 && W[n]==0){
				n = 1000;
			}
		}
		
 		int k = 0;
 		while(H[k]!=0 && W[k]!=0){
 			for(int n = 0; n< H[k]; n++){
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			}
 			k++;
 			System.out.print("\n");
 		}

	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main{
	public static void main(String[] args) throws IOException{

		int[] H = new int[1000];
		int[] W = new int[1000];
		String[] Buffer = new String[10];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;

		for(int n = 0; n<1000; n++){
			Buffer = br.readLine().split(" ");
			H[n] = Integer.parseInt(Buffer[0]);
			W[n] = Integer.parseInt(Buffer[1]);
			//System.out.println("your input is: "+n+" "+H[n]+" "+W[n]);
			if(H[n]==0 && W[n]==0){
				n = 1000;
			}
		}
		
 		int k = 0;
 		while(H[k]!=0 && W[k]!=0){
 			for(int n = 0; n< H[k]; n++){
 				for(int m = 0; m< W[k]; m++){
 					System.out.print("#");
 				}
 				System.out.print("\n");
 			}
 			k++;
 			System.out.print("\n");
 		}

	}
}