import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		List<int[]> hws = new ArrayList<>();
		while(true) {
			int H = sc.nextInt();
			int W = sc.nextInt();
			
			if(H == 0) break;	// 1 <=H.W<= 300
			
			int[] hw = new int[]{H, W};
			hws.add(hw);
			
		}
		sc.close();
		
		for(int[] hw : hws) {
			
			for(int hh = 0; hh < hw[0]; hh++) {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		List<int[]> hws = new ArrayList<>();
		while(true) {
			int H = sc.nextInt();
			int W = sc.nextInt();
			
			if(H == 0) break;	// 1 <=H.W<= 300
			
			int[] hw = new int[]{H, W};
			hws.add(hw);
			
		}
		sc.close();
		
		for(int[] hw : hws) {
			
			for(int hh = 0; hh < hw[0]; hh++) {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
	}
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		List<int[]> hws = new ArrayList<>();
		while(true) {
			int H = sc.nextInt();
			int W = sc.nextInt();
			
			if(H == 0) break;	// 1 <=H.W<= 300
			
			int[] hw = new int[]{H, W};
			hws.add(hw);
			
		}
		sc.close();
		
		for(int[] hw : hws) {
			
			for(int hh = 0; hh < hw[0]; hh++) {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
	} main {
		
		Scanner sc = new Scanner(System.in);
		
		List<int[]> hws = new ArrayList<>();
		while(true) {
			int H = sc.nextInt();
			int W = sc.nextInt();
			
			if(H == 0) break;	// 1 <=H.W<= 300
			
			int[] hw = new int[]{H, W};
			hws.add(hw);
			
		}
		sc.close();
		
		for(int[] hw : hws) {
			
			for(int hh = 0; hh < hw[0]; hh++) {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) List<int[]> hws = new ArrayList<>(); hws new ArrayList<>() while(true) {
			int H = sc.nextInt();
			int W = sc.nextInt();
			
			if(H == 0) break;	// 1 <=H.W<= 300
			
			int[] hw = new int[]{H, W};
			hws.add(hw);
			
		} true {
			int H = sc.nextInt();
			int W = sc.nextInt();
			
			if(H == 0) break;	// 1 <=H.W<= 300
			
			int[] hw = new int[]{H, W};
			hws.add(hw);
			
		} int H = sc.nextInt(); H sc.nextInt() sc.nextInt sc int W = sc.nextInt(); W sc.nextInt() sc.nextInt sc if(H == 0) break;	// 1 <=H.W<= 300 H == 0 H 0 break;	// 1 <=H.W<= 300 int[] hw = new int[]{H, W}; hw new int[]{H, W} hws.add(hw) hws.add hws hw sc.close() sc.close sc for(int[] hw : hws) {
			
			for(int hh = 0; hh < hw[0]; hh++) {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} int[] hw hws {
			
			for(int hh = 0; hh < hw[0]; hh++) {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} {
			
			for(int hh = 0; hh < hw[0]; hh++) {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} for(int hh = 0; hh < hw[0]; hh++) {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			} int hh = 0; int hh = 0; hh 0 hh < hw[0] hh hw[0] hw 0 hh++ hh++ hh {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			} {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			} for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				} int ww = 0; int ww = 0; ww 0 ww < hw[1] ww hw[1] hw 1 ww++ ww++ ww {
					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 String[] args args public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		List<int[]> hws = new ArrayList<>();
		while(true) {
			int H = sc.nextInt();
			int W = sc.nextInt();
			
			if(H == 0) break;	// 1 <=H.W<= 300
			
			int[] hw = new int[]{H, W};
			hws.add(hw);
			
		}
		sc.close();
		
		for(int[] hw : hws) {
			
			for(int hh = 0; hh < hw[0]; hh++) {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
	}
} public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		List<int[]> hws = new ArrayList<>();
		while(true) {
			int H = sc.nextInt();
			int W = sc.nextInt();
			
			if(H == 0) break;	// 1 <=H.W<= 300
			
			int[] hw = new int[]{H, W};
			hws.add(hw);
			
		}
		sc.close();
		
		for(int[] hw : hws) {
			
			for(int hh = 0; hh < hw[0]; hh++) {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		List<int[]> hws = new ArrayList<>();
		while(true) {
			int H = sc.nextInt();
			int W = sc.nextInt();
			
			if(H == 0) break;	// 1 <=H.W<= 300
			
			int[] hw = new int[]{H, W};
			hws.add(hw);
			
		}
		sc.close();
		
		for(int[] hw : hws) {
			
			for(int hh = 0; hh < hw[0]; hh++) {
				for(int ww = 0; ww < hw[1]; ww++) {
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
		
	}
}