import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line = br.readLine();

        while(line != null){            
            String[] input = line.split(" ");
            int height = Integer.valueOf(input[0]);
            int width = Integer.valueOf(input[1]);
            
            if(height == 0 && width == 0) break;
            
            for(int i = 0; i < height; i++){
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            }
            
            System.out.println();
            line = br.readLine();
        }
    }
} import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line = br.readLine();

        while(line != null){            
            String[] input = line.split(" ");
            int height = Integer.valueOf(input[0]);
            int width = Integer.valueOf(input[1]);
            
            if(height == 0 && width == 0) break;
            
            for(int i = 0; i < height; i++){
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            }
            
            System.out.println();
            line = br.readLine();
        }
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line = br.readLine();

        while(line != null){            
            String[] input = line.split(" ");
            int height = Integer.valueOf(input[0]);
            int width = Integer.valueOf(input[1]);
            
            if(height == 0 && width == 0) break;
            
            for(int i = 0; i < height; i++){
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            }
            
            System.out.println();
            line = br.readLine();
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line = br.readLine();

        while(line != null){            
            String[] input = line.split(" ");
            int height = Integer.valueOf(input[0]);
            int width = Integer.valueOf(input[1]);
            
            if(height == 0 && width == 0) break;
            
            for(int i = 0; i < height; i++){
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            }
            
            System.out.println();
            line = br.readLine();
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br while(line != null){            
            String[] input = line.split(" ");
            int height = Integer.valueOf(input[0]);
            int width = Integer.valueOf(input[1]);
            
            if(height == 0 && width == 0) break;
            
            for(int i = 0; i < height; i++){
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            }
            
            System.out.println();
            line = br.readLine();
        } line != null line null {            
            String[] input = line.split(" ");
            int height = Integer.valueOf(input[0]);
            int width = Integer.valueOf(input[1]);
            
            if(height == 0 && width == 0) break;
            
            for(int i = 0; i < height; i++){
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            }
            
            System.out.println();
            line = br.readLine();
        } String[] input = line.split(" "); input line.split(" ") line.split line " " int height = Integer.valueOf(input[0]); height Integer.valueOf(input[0]) Integer.valueOf Integer input[0] input 0 int width = Integer.valueOf(input[1]); width Integer.valueOf(input[1]) Integer.valueOf Integer input[1] input 1 if(height == 0 && width == 0) break; height == 0 && width == 0 height == 0 height 0 width == 0 width 0 break; for(int i = 0; i < height; i++){
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            } int i = 0; int i = 0; i 0 i < height i height i++ i++ i {
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            } {
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            } for(int j = 0; j < width; j++){
                    System.out.print("#");
                } int j = 0; int j = 0; j 0 j < width j width j++ j++ j {
                    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 line = br.readLine() line br.readLine() br.readLine br String[] args args public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line = br.readLine();

        while(line != null){            
            String[] input = line.split(" ");
            int height = Integer.valueOf(input[0]);
            int width = Integer.valueOf(input[1]);
            
            if(height == 0 && width == 0) break;
            
            for(int i = 0; i < height; i++){
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            }
            
            System.out.println();
            line = br.readLine();
        }
    }
} public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line = br.readLine();

        while(line != null){            
            String[] input = line.split(" ");
            int height = Integer.valueOf(input[0]);
            int width = Integer.valueOf(input[1]);
            
            if(height == 0 && width == 0) break;
            
            for(int i = 0; i < height; i++){
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            }
            
            System.out.println();
            line = br.readLine();
        }
    }
} Main
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line = br.readLine();

        while(line != null){            
            String[] input = line.split(" ");
            int height = Integer.valueOf(input[0]);
            int width = Integer.valueOf(input[1]);
            
            if(height == 0 && width == 0) break;
            
            for(int i = 0; i < height; i++){
                for(int j = 0; j < width; j++){
                    System.out.print("#");
                }
                System.out.println();
            }
            
            System.out.println();
            line = br.readLine();
        }
    }
}