import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    while(true){
      int a = scanner.nextInt();
      int b = scanner.nextInt();
      if(a == 0 && b == 0){
        break;
      }

      for(int j = 0; j < a; j++){
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      }
      System.out.print("\n\n");
    }
  }

} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    while(true){
      int a = scanner.nextInt();
      int b = scanner.nextInt();
      if(a == 0 && b == 0){
        break;
      }

      for(int j = 0; j < a; j++){
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      }
      System.out.print("\n\n");
    }
  }

} Main public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    while(true){
      int a = scanner.nextInt();
      int b = scanner.nextInt();
      if(a == 0 && b == 0){
        break;
      }

      for(int j = 0; j < a; j++){
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      }
      System.out.print("\n\n");
    }
  } main {
    Scanner scanner = new Scanner(System.in);
    while(true){
      int a = scanner.nextInt();
      int b = scanner.nextInt();
      if(a == 0 && b == 0){
        break;
      }

      for(int j = 0; j < a; j++){
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      }
      System.out.print("\n\n");
    }
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while(true){
      int a = scanner.nextInt();
      int b = scanner.nextInt();
      if(a == 0 && b == 0){
        break;
      }

      for(int j = 0; j < a; j++){
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      }
      System.out.print("\n\n");
    } true {
      int a = scanner.nextInt();
      int b = scanner.nextInt();
      if(a == 0 && b == 0){
        break;
      }

      for(int j = 0; j < a; j++){
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      }
      System.out.print("\n\n");
    } int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner if(a == 0 && b == 0){
        break;
      } a == 0 && b == 0 a == 0 a 0 b == 0 b 0 {
        break;
      } break; for(int j = 0; j < a; j++){
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      } int j = 0; int j = 0; j 0 j < a j a j++ j++ j {
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      } {
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      } if(j != 0){
          System.out.print("\n");
        } j != 0 j 0 {
          System.out.print("\n");
        } System.out.print("\n") System.out.print System.out System System.out "\n" for(int k = 0; k < b; k++){
          System.out.print("#");
        } int k = 0; int k = 0; k 0 k < b k b k++ k++ k {
          System.out.print("#");
        } {
          System.out.print("#");
        } System.out.print("#") System.out.print System.out System System.out "#" System.out.print("\n\n") System.out.print System.out System System.out "\n\n" String[] args args public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    while(true){
      int a = scanner.nextInt();
      int b = scanner.nextInt();
      if(a == 0 && b == 0){
        break;
      }

      for(int j = 0; j < a; j++){
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      }
      System.out.print("\n\n");
    }
  }

} public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    while(true){
      int a = scanner.nextInt();
      int b = scanner.nextInt();
      if(a == 0 && b == 0){
        break;
      }

      for(int j = 0; j < a; j++){
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      }
      System.out.print("\n\n");
    }
  }

} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    while(true){
      int a = scanner.nextInt();
      int b = scanner.nextInt();
      if(a == 0 && b == 0){
        break;
      }

      for(int j = 0; j < a; j++){
        if(j != 0){
          System.out.print("\n");
        }
        for(int k = 0; k < b; k++){
          System.out.print("#");
        }
      }
      System.out.print("\n\n");
    }
  }

}