import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strArray = new String[2];
    StringBuilder sb = new StringBuilder();
    String line;
    while (true) {
      line = br.readLine();
      strArray = line.split(" ");
      int h = Integer.parseInt(strArray[0]);
      int w = Integer.parseInt(strArray[1]);
      if(h == 0 && w == 0) {
        break;
      }
      for (int i = 0;i < h;i++) {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      }
      sb.append("\n");
    }
    System.out.print(sb);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strArray = new String[2];
    StringBuilder sb = new StringBuilder();
    String line;
    while (true) {
      line = br.readLine();
      strArray = line.split(" ");
      int h = Integer.parseInt(strArray[0]);
      int w = Integer.parseInt(strArray[1]);
      if(h == 0 && w == 0) {
        break;
      }
      for (int i = 0;i < h;i++) {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      }
      sb.append("\n");
    }
    System.out.print(sb);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strArray = new String[2];
    StringBuilder sb = new StringBuilder();
    String line;
    while (true) {
      line = br.readLine();
      strArray = line.split(" ");
      int h = Integer.parseInt(strArray[0]);
      int w = Integer.parseInt(strArray[1]);
      if(h == 0 && w == 0) {
        break;
      }
      for (int i = 0;i < h;i++) {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      }
      sb.append("\n");
    }
    System.out.print(sb);
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strArray = new String[2];
    StringBuilder sb = new StringBuilder();
    String line;
    while (true) {
      line = br.readLine();
      strArray = line.split(" ");
      int h = Integer.parseInt(strArray[0]);
      int w = Integer.parseInt(strArray[1]);
      if(h == 0 && w == 0) {
        break;
      }
      for (int i = 0;i < h;i++) {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      }
      sb.append("\n");
    }
    System.out.print(sb);
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] strArray = new String[2]; strArray new String[2] 2 StringBuilder sb = new StringBuilder(); sb new StringBuilder() String line; line while (true) {
      line = br.readLine();
      strArray = line.split(" ");
      int h = Integer.parseInt(strArray[0]);
      int w = Integer.parseInt(strArray[1]);
      if(h == 0 && w == 0) {
        break;
      }
      for (int i = 0;i < h;i++) {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      }
      sb.append("\n");
    } true {
      line = br.readLine();
      strArray = line.split(" ");
      int h = Integer.parseInt(strArray[0]);
      int w = Integer.parseInt(strArray[1]);
      if(h == 0 && w == 0) {
        break;
      }
      for (int i = 0;i < h;i++) {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      }
      sb.append("\n");
    } line = br.readLine() line br.readLine() br.readLine br strArray = line.split(" ") strArray line.split(" ") line.split line " " int h = Integer.parseInt(strArray[0]); h Integer.parseInt(strArray[0]) Integer.parseInt Integer strArray[0] strArray 0 int w = Integer.parseInt(strArray[1]); w Integer.parseInt(strArray[1]) Integer.parseInt Integer strArray[1] strArray 1 if(h == 0 && w == 0) {
        break;
      } h == 0 && w == 0 h == 0 h 0 w == 0 w 0 {
        break;
      } break; for (int i = 0;i < h;i++) {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      } int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      } {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      } for (int f = 0;f < w;f++) {
          sb.append("#");
        } int f = 0; int f = 0; f 0 f < w f w f++ f++ f {
          sb.append("#");
        } {
          sb.append("#");
        } sb.append("#") sb.append sb "#" sb.append("\n") sb.append sb "\n" sb.append("\n") sb.append sb "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strArray = new String[2];
    StringBuilder sb = new StringBuilder();
    String line;
    while (true) {
      line = br.readLine();
      strArray = line.split(" ");
      int h = Integer.parseInt(strArray[0]);
      int w = Integer.parseInt(strArray[1]);
      if(h == 0 && w == 0) {
        break;
      }
      for (int i = 0;i < h;i++) {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      }
      sb.append("\n");
    }
    System.out.print(sb);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strArray = new String[2];
    StringBuilder sb = new StringBuilder();
    String line;
    while (true) {
      line = br.readLine();
      strArray = line.split(" ");
      int h = Integer.parseInt(strArray[0]);
      int w = Integer.parseInt(strArray[1]);
      if(h == 0 && w == 0) {
        break;
      }
      for (int i = 0;i < h;i++) {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      }
      sb.append("\n");
    }
    System.out.print(sb);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strArray = new String[2];
    StringBuilder sb = new StringBuilder();
    String line;
    while (true) {
      line = br.readLine();
      strArray = line.split(" ");
      int h = Integer.parseInt(strArray[0]);
      int w = Integer.parseInt(strArray[1]);
      if(h == 0 && w == 0) {
        break;
      }
      for (int i = 0;i < h;i++) {
        for (int f = 0;f < w;f++) {
          sb.append("#");
        }
        sb.append("\n");
      }
      sb.append("\n");
    }
    System.out.print(sb);
  }
}