import java.io.*;
import java.util.*;
  
public class Main{
    public static void main(String[] args)throws IOException, NumberFormatException{
        BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
        ArrayList<Integer> h = new ArrayList<Integer>();
        ArrayList<Integer> w = new ArrayList<Integer>();
          
        while(true){
            String[] s = br.readLine().split(" ");
            if( "0".equals(s[0]) && "0".equals(s[1]) ) break;
              
            h.add( Integer.parseInt(s[0]) );
            w.add( Integer.parseInt(s[1]) );
        }
          
        StringBuilder builder = new StringBuilder();
        for( int i=0 ; i<h.size() ; i++ ){
            for( int j=0 ; j<h.get(i) ; j++ ){
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            }
            builder.append("\n");
        }
        System.out.print(builder);
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
    public static void main(String[] args)throws IOException, NumberFormatException{
        BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
        ArrayList<Integer> h = new ArrayList<Integer>();
        ArrayList<Integer> w = new ArrayList<Integer>();
          
        while(true){
            String[] s = br.readLine().split(" ");
            if( "0".equals(s[0]) && "0".equals(s[1]) ) break;
              
            h.add( Integer.parseInt(s[0]) );
            w.add( Integer.parseInt(s[1]) );
        }
          
        StringBuilder builder = new StringBuilder();
        for( int i=0 ; i<h.size() ; i++ ){
            for( int j=0 ; j<h.get(i) ; j++ ){
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            }
            builder.append("\n");
        }
        System.out.print(builder);
    }
} Main public static void main(String[] args)throws IOException, NumberFormatException{
        BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
        ArrayList<Integer> h = new ArrayList<Integer>();
        ArrayList<Integer> w = new ArrayList<Integer>();
          
        while(true){
            String[] s = br.readLine().split(" ");
            if( "0".equals(s[0]) && "0".equals(s[1]) ) break;
              
            h.add( Integer.parseInt(s[0]) );
            w.add( Integer.parseInt(s[1]) );
        }
          
        StringBuilder builder = new StringBuilder();
        for( int i=0 ; i<h.size() ; i++ ){
            for( int j=0 ; j<h.get(i) ; j++ ){
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            }
            builder.append("\n");
        }
        System.out.print(builder);
    } main {
        BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
        ArrayList<Integer> h = new ArrayList<Integer>();
        ArrayList<Integer> w = new ArrayList<Integer>();
          
        while(true){
            String[] s = br.readLine().split(" ");
            if( "0".equals(s[0]) && "0".equals(s[1]) ) break;
              
            h.add( Integer.parseInt(s[0]) );
            w.add( Integer.parseInt(s[1]) );
        }
          
        StringBuilder builder = new StringBuilder();
        for( int i=0 ; i<h.size() ; i++ ){
            for( int j=0 ; j<h.get(i) ; j++ ){
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            }
            builder.append("\n");
        }
        System.out.print(builder);
    } BufferedReader br = new BufferedReader (new InputStreamReader(System.in)); br new BufferedReader (new InputStreamReader(System.in)) ArrayList<Integer> h = new ArrayList<Integer>(); h new ArrayList<Integer>() ArrayList<Integer> w = new ArrayList<Integer>(); w new ArrayList<Integer>() while(true){
            String[] s = br.readLine().split(" ");
            if( "0".equals(s[0]) && "0".equals(s[1]) ) break;
              
            h.add( Integer.parseInt(s[0]) );
            w.add( Integer.parseInt(s[1]) );
        } true {
            String[] s = br.readLine().split(" ");
            if( "0".equals(s[0]) && "0".equals(s[1]) ) break;
              
            h.add( Integer.parseInt(s[0]) );
            w.add( Integer.parseInt(s[1]) );
        } String[] s = br.readLine().split(" "); s br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " if( "0".equals(s[0]) && "0".equals(s[1]) ) break; "0".equals(s[0]) && "0".equals(s[1]) "0".equals(s[0]) "0".equals "0" s[0] s 0 "0".equals(s[1]) "0".equals "0" s[1] s 1 break; h.add( Integer.parseInt(s[0]) ) h.add h Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 w.add( Integer.parseInt(s[1]) ) w.add w Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 StringBuilder builder = new StringBuilder(); builder new StringBuilder() for( int i=0 ; i<h.size() ; i++ ){
            for( int j=0 ; j<h.get(i) ; j++ ){
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            }
            builder.append("\n");
        } int i=0 ; int i=0 ; i 0 i<h.size() i h.size() h.size h i++ i++ i {
            for( int j=0 ; j<h.get(i) ; j++ ){
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            }
            builder.append("\n");
        } {
            for( int j=0 ; j<h.get(i) ; j++ ){
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            }
            builder.append("\n");
        } for( int j=0 ; j<h.get(i) ; j++ ){
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            } int j=0 ; int j=0 ; j 0 j<h.get(i) j h.get(i) h.get h i j++ j++ j {
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            } {
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            } for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                } int k=0 ; int k=0 ; k 0 k<w.get(i) k w.get(i) w.get w i k++ k++ k {
                    builder.append("#");
                } {
                    builder.append("#");
                } builder.append("#") builder.append builder "#" builder.append("\n") builder.append builder "\n" builder.append("\n") builder.append builder "\n" System.out.print(builder) System.out.print System.out System System.out builder String[] args args public class Main{
    public static void main(String[] args)throws IOException, NumberFormatException{
        BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
        ArrayList<Integer> h = new ArrayList<Integer>();
        ArrayList<Integer> w = new ArrayList<Integer>();
          
        while(true){
            String[] s = br.readLine().split(" ");
            if( "0".equals(s[0]) && "0".equals(s[1]) ) break;
              
            h.add( Integer.parseInt(s[0]) );
            w.add( Integer.parseInt(s[1]) );
        }
          
        StringBuilder builder = new StringBuilder();
        for( int i=0 ; i<h.size() ; i++ ){
            for( int j=0 ; j<h.get(i) ; j++ ){
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            }
            builder.append("\n");
        }
        System.out.print(builder);
    }
} public class Main{
    public static void main(String[] args)throws IOException, NumberFormatException{
        BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
        ArrayList<Integer> h = new ArrayList<Integer>();
        ArrayList<Integer> w = new ArrayList<Integer>();
          
        while(true){
            String[] s = br.readLine().split(" ");
            if( "0".equals(s[0]) && "0".equals(s[1]) ) break;
              
            h.add( Integer.parseInt(s[0]) );
            w.add( Integer.parseInt(s[1]) );
        }
          
        StringBuilder builder = new StringBuilder();
        for( int i=0 ; i<h.size() ; i++ ){
            for( int j=0 ; j<h.get(i) ; j++ ){
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            }
            builder.append("\n");
        }
        System.out.print(builder);
    }
} Main
import java.io.*;
import java.util.*;
  
public class Main{
    public static void main(String[] args)throws IOException, NumberFormatException{
        BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
        ArrayList<Integer> h = new ArrayList<Integer>();
        ArrayList<Integer> w = new ArrayList<Integer>();
          
        while(true){
            String[] s = br.readLine().split(" ");
            if( "0".equals(s[0]) && "0".equals(s[1]) ) break;
              
            h.add( Integer.parseInt(s[0]) );
            w.add( Integer.parseInt(s[1]) );
        }
          
        StringBuilder builder = new StringBuilder();
        for( int i=0 ; i<h.size() ; i++ ){
            for( int j=0 ; j<h.get(i) ; j++ ){
                for( int k=0 ; k<w.get(i) ; k++ ){
                    builder.append("#");
                }
                builder.append("\n");
            }
            builder.append("\n");
        }
        System.out.print(builder);
    }
}