import java.util.Scanner;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		StringBuilder all = new StringBuilder();
		StringBuilder out = new StringBuilder();
		
		while(true){
			int H = sc.nextInt();
			int W = sc.nextInt();
			if((H + W) <= 0){break;}
				for(int j = 0; j < H; j++){
					for(int i = 0; i < W; i++){
						out = out.append("#");
					}
					out = out.append("\n");
				}
			all = all.append(out + "\n");
			out.delete(0, out.length());
		}
        
		System.out.print(all);
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		StringBuilder all = new StringBuilder();
		StringBuilder out = new StringBuilder();
		
		while(true){
			int H = sc.nextInt();
			int W = sc.nextInt();
			if((H + W) <= 0){break;}
				for(int j = 0; j < H; j++){
					for(int i = 0; i < W; i++){
						out = out.append("#");
					}
					out = out.append("\n");
				}
			all = all.append(out + "\n");
			out.delete(0, out.length());
		}
        
		System.out.print(all);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		StringBuilder all = new StringBuilder();
		StringBuilder out = new StringBuilder();
		
		while(true){
			int H = sc.nextInt();
			int W = sc.nextInt();
			if((H + W) <= 0){break;}
				for(int j = 0; j < H; j++){
					for(int i = 0; i < W; i++){
						out = out.append("#");
					}
					out = out.append("\n");
				}
			all = all.append(out + "\n");
			out.delete(0, out.length());
		}
        
		System.out.print(all);
	} main {
		Scanner sc = new Scanner(System.in);
		StringBuilder all = new StringBuilder();
		StringBuilder out = new StringBuilder();
		
		while(true){
			int H = sc.nextInt();
			int W = sc.nextInt();
			if((H + W) <= 0){break;}
				for(int j = 0; j < H; j++){
					for(int i = 0; i < W; i++){
						out = out.append("#");
					}
					out = out.append("\n");
				}
			all = all.append(out + "\n");
			out.delete(0, out.length());
		}
        
		System.out.print(all);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) StringBuilder all = new StringBuilder(); all new StringBuilder() StringBuilder out = new StringBuilder(); out new StringBuilder() while(true){
			int H = sc.nextInt();
			int W = sc.nextInt();
			if((H + W) <= 0){break;}
				for(int j = 0; j < H; j++){
					for(int i = 0; i < W; i++){
						out = out.append("#");
					}
					out = out.append("\n");
				}
			all = all.append(out + "\n");
			out.delete(0, out.length());
		} true {
			int H = sc.nextInt();
			int W = sc.nextInt();
			if((H + W) <= 0){break;}
				for(int j = 0; j < H; j++){
					for(int i = 0; i < W; i++){
						out = out.append("#");
					}
					out = out.append("\n");
				}
			all = all.append(out + "\n");
			out.delete(0, out.length());
		} int H = sc.nextInt(); H sc.nextInt() sc.nextInt sc int W = sc.nextInt(); W sc.nextInt() sc.nextInt sc if((H + W) <= 0){break;} (H + W) <= 0 (H + W) H W 0 {break;} break; for(int j = 0; j < H; j++){
					for(int i = 0; i < W; i++){
						out = out.append("#");
					}
					out = out.append("\n");
				} int j = 0; int j = 0; j 0 j < H j H j++ j++ j {
					for(int i = 0; i < W; i++){
						out = out.append("#");
					}
					out = out.append("\n");
				} {
					for(int i = 0; i < W; i++){
						out = out.append("#");
					}
					out = out.append("\n");
				} for(int i = 0; i < W; i++){
						out = out.append("#");
					} int i = 0; int i = 0; i 0 i < W i W i++ i++ i {
						out = out.append("#");
					} {
						out = out.append("#");
					} out = out.append("#") out out.append("#") out.append out "#" out = out.append("\n") out out.append("\n") out.append out "\n" all = all.append(out + "\n") all all.append(out + "\n") all.append all out + "\n" out "\n" out.delete(0, out.length()) out.delete out 0 out.length() out.length out System.out.print(all) System.out.print System.out System System.out all String[] args args
import java.util.Scanner;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		StringBuilder all = new StringBuilder();
		StringBuilder out = new StringBuilder();
		
		while(true){
			int H = sc.nextInt();
			int W = sc.nextInt();
			if((H + W) <= 0){break;}
				for(int j = 0; j < H; j++){
					for(int i = 0; i < W; i++){
						out = out.append("#");
					}
					out = out.append("\n");
				}
			all = all.append(out + "\n");
			out.delete(0, out.length());
		}
        
		System.out.print(all);
	}
}
