import java.util.Scanner;

public class Main {
  private static int x, y;
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    while (true) {
      y = stdIn.nextInt();
      x = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      }
      for (int i = 0;i < y; i++) {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  private static int x, y;
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    while (true) {
      y = stdIn.nextInt();
      x = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      }
      for (int i = 0;i < y; i++) {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }
  }
} Main private static int x x y; y public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    while (true) {
      y = stdIn.nextInt();
      x = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      }
      for (int i = 0;i < y; i++) {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }
  } main {
    Scanner stdIn = new Scanner(System.in);
    while (true) {
      y = stdIn.nextInt();
      x = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      }
      for (int i = 0;i < y; i++) {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }
  } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) while (true) {
      y = stdIn.nextInt();
      x = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      }
      for (int i = 0;i < y; i++) {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    } true {
      y = stdIn.nextInt();
      x = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      }
      for (int i = 0;i < y; i++) {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    } y = stdIn.nextInt() y stdIn.nextInt() stdIn.nextInt stdIn x = stdIn.nextInt() x stdIn.nextInt() stdIn.nextInt stdIn if (x == 0 && y == 0) {
        break;
      } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
        break;
      } break; for (int i = 0;i < y; i++) {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      } int i = 0; int i = 0; i 0 i < y i y i++ i++ i {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      } {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      } for (int j =0;j < x; j++) {
          System.out.print("#");
        } int j =0; int j =0; j 0 j < x j x 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 public class Main {
  private static int x, y;
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    while (true) {
      y = stdIn.nextInt();
      x = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      }
      for (int i = 0;i < y; i++) {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }
  }
} public class Main {
  private static int x, y;
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    while (true) {
      y = stdIn.nextInt();
      x = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      }
      for (int i = 0;i < y; i++) {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }
  }
} Main
import java.util.Scanner;

public class Main {
  private static int x, y;
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    while (true) {
      y = stdIn.nextInt();
      x = stdIn.nextInt();
      if (x == 0 && y == 0) {
        break;
      }
      for (int i = 0;i < y; i++) {
        for (int j =0;j < x; j++) {
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }
  }
}