import java.io.*;
import java.util.*;

class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String data;
    List<String> rectangle_list = new ArrayList<String>();
    while(true){
      data = br.readLine();
      if(data.equals("0 0")){
        break;
      }
      rectangle_list.add(data);
    }

    int height = 0;
    int width  = 0;
    String[] tmp = new String[2];
    for(String rectangle: rectangle_list){
      tmp = rectangle.split(" ");
      height = Integer.parseInt(tmp[0]);
      width  = Integer.parseInt(tmp[1]);
      for(int i = 0; i < height; i++ ){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println();
      }
      System.out.println();
    }
  }
}
 import java.io.*; io.* java import java.util.*; util.* java class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String data;
    List<String> rectangle_list = new ArrayList<String>();
    while(true){
      data = br.readLine();
      if(data.equals("0 0")){
        break;
      }
      rectangle_list.add(data);
    }

    int height = 0;
    int width  = 0;
    String[] tmp = new String[2];
    for(String rectangle: rectangle_list){
      tmp = rectangle.split(" ");
      height = Integer.parseInt(tmp[0]);
      width  = Integer.parseInt(tmp[1]);
      for(int i = 0; i < height; i++ ){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println();
      }
      System.out.println();
    }
  }
} Main public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String data;
    List<String> rectangle_list = new ArrayList<String>();
    while(true){
      data = br.readLine();
      if(data.equals("0 0")){
        break;
      }
      rectangle_list.add(data);
    }

    int height = 0;
    int width  = 0;
    String[] tmp = new String[2];
    for(String rectangle: rectangle_list){
      tmp = rectangle.split(" ");
      height = Integer.parseInt(tmp[0]);
      width  = Integer.parseInt(tmp[1]);
      for(int i = 0; i < height; i++ ){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println();
      }
      System.out.println();
    }
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String data;
    List<String> rectangle_list = new ArrayList<String>();
    while(true){
      data = br.readLine();
      if(data.equals("0 0")){
        break;
      }
      rectangle_list.add(data);
    }

    int height = 0;
    int width  = 0;
    String[] tmp = new String[2];
    for(String rectangle: rectangle_list){
      tmp = rectangle.split(" ");
      height = Integer.parseInt(tmp[0]);
      width  = Integer.parseInt(tmp[1]);
      for(int i = 0; i < height; i++ ){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println();
      }
      System.out.println();
    }
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String data; data List<String> rectangle_list = new ArrayList<String>(); rectangle_list new ArrayList<String>() while(true){
      data = br.readLine();
      if(data.equals("0 0")){
        break;
      }
      rectangle_list.add(data);
    } true {
      data = br.readLine();
      if(data.equals("0 0")){
        break;
      }
      rectangle_list.add(data);
    } data = br.readLine() data br.readLine() br.readLine br if(data.equals("0 0")){
        break;
      } data.equals("0 0") data.equals data "0 0" {
        break;
      } break; rectangle_list.add(data) rectangle_list.add rectangle_list data int height = 0; height 0 int width  = 0; width 0 String[] tmp = new String[2]; tmp new String[2] 2 for(String rectangle: rectangle_list){
      tmp = rectangle.split(" ");
      height = Integer.parseInt(tmp[0]);
      width  = Integer.parseInt(tmp[1]);
      for(int i = 0; i < height; i++ ){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println();
      }
      System.out.println();
    } String rectangle rectangle_list {
      tmp = rectangle.split(" ");
      height = Integer.parseInt(tmp[0]);
      width  = Integer.parseInt(tmp[1]);
      for(int i = 0; i < height; i++ ){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println();
      }
      System.out.println();
    } {
      tmp = rectangle.split(" ");
      height = Integer.parseInt(tmp[0]);
      width  = Integer.parseInt(tmp[1]);
      for(int i = 0; i < height; i++ ){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println();
      }
      System.out.println();
    } tmp = rectangle.split(" ") tmp rectangle.split(" ") rectangle.split rectangle " " height = Integer.parseInt(tmp[0]) height Integer.parseInt(tmp[0]) Integer.parseInt Integer tmp[0] tmp 0 width  = Integer.parseInt(tmp[1]) width Integer.parseInt(tmp[1]) Integer.parseInt Integer tmp[1] tmp 1 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 String[] args args
import java.io.*;
import java.util.*;

class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String data;
    List<String> rectangle_list = new ArrayList<String>();
    while(true){
      data = br.readLine();
      if(data.equals("0 0")){
        break;
      }
      rectangle_list.add(data);
    }

    int height = 0;
    int width  = 0;
    String[] tmp = new String[2];
    for(String rectangle: rectangle_list){
      tmp = rectangle.split(" ");
      height = Integer.parseInt(tmp[0]);
      width  = Integer.parseInt(tmp[1]);
      for(int i = 0; i < height; i++ ){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println();
      }
      System.out.println();
    }
  }
}

