import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int H =0;
    int W =0;
    while(true){
     H = sc.nextInt();
     W = sc.nextInt();

//  System.out.println("");
   if(H != 0 && W != 0){
    for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    }
    System.out.println("");
  }else{
    return;
  }

}
//  sc.close();
  //System.exit(0);

  }

} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int H =0;
    int W =0;
    while(true){
     H = sc.nextInt();
     W = sc.nextInt();

//  System.out.println("");
   if(H != 0 && W != 0){
    for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    }
    System.out.println("");
  }else{
    return;
  }

}
//  sc.close();
  //System.exit(0);

  }

} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int H =0;
    int W =0;
    while(true){
     H = sc.nextInt();
     W = sc.nextInt();

//  System.out.println("");
   if(H != 0 && W != 0){
    for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    }
    System.out.println("");
  }else{
    return;
  }

}
//  sc.close();
  //System.exit(0);

  } main {
    Scanner sc = new Scanner(System.in);
    int H =0;
    int W =0;
    while(true){
     H = sc.nextInt();
     W = sc.nextInt();

//  System.out.println("");
   if(H != 0 && W != 0){
    for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    }
    System.out.println("");
  }else{
    return;
  }

}
//  sc.close();
  //System.exit(0);

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int H =0; H 0 int W =0; W 0 while(true){
     H = sc.nextInt();
     W = sc.nextInt();

//  System.out.println("");
   if(H != 0 && W != 0){
    for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    }
    System.out.println("");
  }else{
    return;
  }

} true {
     H = sc.nextInt();
     W = sc.nextInt();

//  System.out.println("");
   if(H != 0 && W != 0){
    for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    }
    System.out.println("");
  }else{
    return;
  }

} H = sc.nextInt() H sc.nextInt() sc.nextInt sc W = sc.nextInt() W sc.nextInt() sc.nextInt sc if(H != 0 && W != 0){
    for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    }
    System.out.println("");
  }else{
    return;
  } H != 0 && W != 0 H != 0 H 0 W != 0 W 0 {
    for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    }
    System.out.println("");
  } for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    } int i = 0; int i = 0; i 0 i < H i H i++ i++ i {
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    } {
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    } for(int j = 0; j < W ; j++){
        System.out.print("#");
      } int j = 0; int j = 0; j 0 j < W j W j++ j++ j {
        System.out.print("#");
      } {
        System.out.print("#");
      } System.out.print("#") System.out.print System.out System System.out "#" System.out.print("\n") System.out.print System.out System System.out "\n" System.out.println("") System.out.println System.out System System.out "" {
    return;
  } return; String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int H =0;
    int W =0;
    while(true){
     H = sc.nextInt();
     W = sc.nextInt();

//  System.out.println("");
   if(H != 0 && W != 0){
    for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    }
    System.out.println("");
  }else{
    return;
  }

}
//  sc.close();
  //System.exit(0);

  }

} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int H =0;
    int W =0;
    while(true){
     H = sc.nextInt();
     W = sc.nextInt();

//  System.out.println("");
   if(H != 0 && W != 0){
    for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    }
    System.out.println("");
  }else{
    return;
  }

}
//  sc.close();
  //System.exit(0);

  }

} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int H =0;
    int W =0;
    while(true){
     H = sc.nextInt();
     W = sc.nextInt();

//  System.out.println("");
   if(H != 0 && W != 0){
    for(int i = 0; i < H ; i++){
      for(int j = 0; j < W ; j++){
        System.out.print("#");
      }
      System.out.print("\n");
    }
    System.out.println("");
  }else{
    return;
  }

}
//  sc.close();
  //System.exit(0);

  }

}
