import java.util.Scanner;
public class Main{
    public static void main(String args[]){
        int i,a,b;
        int[] m,n;
        m = new int[100];
        n = new int[100];
        Scanner scan = new Scanner(System.in);
        for(i=0;i<100;i++){
            m[i] = scan.nextInt();
            n[i] = scan.nextInt();
            if(m[i]==0 && n[i]==0) break;
        }
        for(i=0;i<100;i++){
            if(m[i]==0 && n[i]==0) break;
            for(a=0;a<m[i];a++){
                for(b=0;b<n[i];b++){
                    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[]){
        int i,a,b;
        int[] m,n;
        m = new int[100];
        n = new int[100];
        Scanner scan = new Scanner(System.in);
        for(i=0;i<100;i++){
            m[i] = scan.nextInt();
            n[i] = scan.nextInt();
            if(m[i]==0 && n[i]==0) break;
        }
        for(i=0;i<100;i++){
            if(m[i]==0 && n[i]==0) break;
            for(a=0;a<m[i];a++){
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
        
    }
} Main public static void main(String args[]){
        int i,a,b;
        int[] m,n;
        m = new int[100];
        n = new int[100];
        Scanner scan = new Scanner(System.in);
        for(i=0;i<100;i++){
            m[i] = scan.nextInt();
            n[i] = scan.nextInt();
            if(m[i]==0 && n[i]==0) break;
        }
        for(i=0;i<100;i++){
            if(m[i]==0 && n[i]==0) break;
            for(a=0;a<m[i];a++){
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
        
    } main {
        int i,a,b;
        int[] m,n;
        m = new int[100];
        n = new int[100];
        Scanner scan = new Scanner(System.in);
        for(i=0;i<100;i++){
            m[i] = scan.nextInt();
            n[i] = scan.nextInt();
            if(m[i]==0 && n[i]==0) break;
        }
        for(i=0;i<100;i++){
            if(m[i]==0 && n[i]==0) break;
            for(a=0;a<m[i];a++){
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
        
    } int i i a a b; b int[] m m n; n m = new int[100] m new int[100] 100 n = new int[100] n new int[100] 100 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) for(i=0;i<100;i++){
            m[i] = scan.nextInt();
            n[i] = scan.nextInt();
            if(m[i]==0 && n[i]==0) break;
        } i=0; i=0 i 0 i<100 i 100 i++ i++ i {
            m[i] = scan.nextInt();
            n[i] = scan.nextInt();
            if(m[i]==0 && n[i]==0) break;
        } {
            m[i] = scan.nextInt();
            n[i] = scan.nextInt();
            if(m[i]==0 && n[i]==0) break;
        } m[i] = scan.nextInt() m[i] m i scan.nextInt() scan.nextInt scan n[i] = scan.nextInt() n[i] n i scan.nextInt() scan.nextInt scan if(m[i]==0 && n[i]==0) break; m[i]==0 && n[i]==0 m[i]==0 m[i] m i 0 n[i]==0 n[i] n i 0 break; for(i=0;i<100;i++){
            if(m[i]==0 && n[i]==0) break;
            for(a=0;a<m[i];a++){
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        } i=0; i=0 i 0 i<100 i 100 i++ i++ i {
            if(m[i]==0 && n[i]==0) break;
            for(a=0;a<m[i];a++){
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        } {
            if(m[i]==0 && n[i]==0) break;
            for(a=0;a<m[i];a++){
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        } if(m[i]==0 && n[i]==0) break; m[i]==0 && n[i]==0 m[i]==0 m[i] m i 0 n[i]==0 n[i] n i 0 break; for(a=0;a<m[i];a++){
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            } a=0; a=0 a 0 a<m[i] a m[i] m i a++ a++ a {
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            } {
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            } for(b=0;b<n[i];b++){
                    System.out.print("#");
                } b=0; b=0 b 0 b<n[i] b n[i] n i b++ b++ b {
                    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[]){
        int i,a,b;
        int[] m,n;
        m = new int[100];
        n = new int[100];
        Scanner scan = new Scanner(System.in);
        for(i=0;i<100;i++){
            m[i] = scan.nextInt();
            n[i] = scan.nextInt();
            if(m[i]==0 && n[i]==0) break;
        }
        for(i=0;i<100;i++){
            if(m[i]==0 && n[i]==0) break;
            for(a=0;a<m[i];a++){
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
        
    }
} public class Main{
    public static void main(String args[]){
        int i,a,b;
        int[] m,n;
        m = new int[100];
        n = new int[100];
        Scanner scan = new Scanner(System.in);
        for(i=0;i<100;i++){
            m[i] = scan.nextInt();
            n[i] = scan.nextInt();
            if(m[i]==0 && n[i]==0) break;
        }
        for(i=0;i<100;i++){
            if(m[i]==0 && n[i]==0) break;
            for(a=0;a<m[i];a++){
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
        
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String args[]){
        int i,a,b;
        int[] m,n;
        m = new int[100];
        n = new int[100];
        Scanner scan = new Scanner(System.in);
        for(i=0;i<100;i++){
            m[i] = scan.nextInt();
            n[i] = scan.nextInt();
            if(m[i]==0 && n[i]==0) break;
        }
        for(i=0;i<100;i++){
            if(m[i]==0 && n[i]==0) break;
            for(a=0;a<m[i];a++){
                for(b=0;b<n[i];b++){
                    System.out.print("#");
                }
                System.out.println("");
            }
            System.out.println("");
        }
        
    }
}
