import java.util.Scanner;



public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b;
		for(;;){
			a=sc.nextInt();
			b=sc.nextInt();
			if(a==0&&b==0)break;
			else{for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			}
		}

	}} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b;
		for(;;){
			a=sc.nextInt();
			b=sc.nextInt();
			if(a==0&&b==0)break;
			else{for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			}
		}

	}} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b;
		for(;;){
			a=sc.nextInt();
			b=sc.nextInt();
			if(a==0&&b==0)break;
			else{for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			}
		}

	} main {
		Scanner sc = new Scanner(System.in);
		int a,b;
		for(;;){
			a=sc.nextInt();
			b=sc.nextInt();
			if(a==0&&b==0)break;
			else{for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			}
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a a b; b for(;;){
			a=sc.nextInt();
			b=sc.nextInt();
			if(a==0&&b==0)break;
			else{for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			}
		} ; {
			a=sc.nextInt();
			b=sc.nextInt();
			if(a==0&&b==0)break;
			else{for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			}
		} {
			a=sc.nextInt();
			b=sc.nextInt();
			if(a==0&&b==0)break;
			else{for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			}
		} a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc if(a==0&&b==0)break;
			else{for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			} a==0&&b==0 a==0 a 0 b==0 b 0 break; {for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			} for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				} int i=0; int i=0; i 0 i<a i a i++ i++ i {
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				} {
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				} for(int l = 0;l<b;l++){
					System.out.print("#");} int l = 0; int l = 0; l 0 l<b l b l++ l++ l {
					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);
		int a,b;
		for(;;){
			a=sc.nextInt();
			b=sc.nextInt();
			if(a==0&&b==0)break;
			else{for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			}
		}

	}} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b;
		for(;;){
			a=sc.nextInt();
			b=sc.nextInt();
			if(a==0&&b==0)break;
			else{for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			}
		}

	}} Main
import java.util.Scanner;



public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b;
		for(;;){
			a=sc.nextInt();
			b=sc.nextInt();
			if(a==0&&b==0)break;
			else{for(int i=0;i<a;i++){
				for(int l = 0;l<b;l++){
					System.out.print("#");}
				System.out.println();
				}System.out.println();
			}
		}

	}}