import java.util.Scanner;
class Main{
    public static void main(String[] args){
	final Scanner sc=new Scanner(System.in);
	while(true){
	    int a=sc.nextInt();
	    int b=sc.nextInt();
	    if(a==0 && b==0) break;
	    for(int i=0;i<a;i++){
		for(int j=0;j<b;j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");	
	    }
	    System.out.printf("\n");
	}
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
	final Scanner sc=new Scanner(System.in);
	while(true){
	    int a=sc.nextInt();
	    int b=sc.nextInt();
	    if(a==0 && b==0) break;
	    for(int i=0;i<a;i++){
		for(int j=0;j<b;j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");	
	    }
	    System.out.printf("\n");
	}
    }
} Main public static void main(String[] args){
	final Scanner sc=new Scanner(System.in);
	while(true){
	    int a=sc.nextInt();
	    int b=sc.nextInt();
	    if(a==0 && b==0) break;
	    for(int i=0;i<a;i++){
		for(int j=0;j<b;j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");	
	    }
	    System.out.printf("\n");
	}
    } main {
	final Scanner sc=new Scanner(System.in);
	while(true){
	    int a=sc.nextInt();
	    int b=sc.nextInt();
	    if(a==0 && b==0) break;
	    for(int i=0;i<a;i++){
		for(int j=0;j<b;j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");	
	    }
	    System.out.printf("\n");
	}
    } final Scanner sc=new Scanner(System.in); sc new Scanner(System.in) while(true){
	    int a=sc.nextInt();
	    int b=sc.nextInt();
	    if(a==0 && b==0) break;
	    for(int i=0;i<a;i++){
		for(int j=0;j<b;j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");	
	    }
	    System.out.printf("\n");
	} true {
	    int a=sc.nextInt();
	    int b=sc.nextInt();
	    if(a==0 && b==0) break;
	    for(int i=0;i<a;i++){
		for(int j=0;j<b;j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");	
	    }
	    System.out.printf("\n");
	} int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc int b=sc.nextInt(); b sc.nextInt() sc.nextInt sc if(a==0 && b==0) break; a==0 && b==0 a==0 a 0 b==0 b 0 break; for(int i=0;i<a;i++){
		for(int j=0;j<b;j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");	
	    } int i=0; int i=0; i 0 i<a i a i++ i++ i {
		for(int j=0;j<b;j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");	
	    } {
		for(int j=0;j<b;j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");	
	    } for(int j=0;j<b;j++){
		    System.out.printf("#");
		} int j=0; int j=0; j 0 j<b j b j++ j++ j {
		    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
import java.util.Scanner;
class Main{
    public static void main(String[] args){
	final Scanner sc=new Scanner(System.in);
	while(true){
	    int a=sc.nextInt();
	    int b=sc.nextInt();
	    if(a==0 && b==0) break;
	    for(int i=0;i<a;i++){
		for(int j=0;j<b;j++){
		    System.out.printf("#");
		}
		System.out.printf("\n");	
	    }
	    System.out.printf("\n");
	}
    }
}