import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;

public class Main {
  public static void main(String args[] ) throws IOException {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

      String readLine = br.readLine();
      while( readLine != null ) {
        readLine = readLine.trim();
        String[] readLineArray = readLine.split(" ");

        int h = Integer.parseInt(readLineArray[0]);
        int w = Integer.parseInt(readLineArray[1]);

        if ( h == 0 && w == 0) {
          break;
        }

        for (int i = 0 ; i < h ; i++) {
          for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        }
        System.out.print("\n");
        readLine = br.readLine();
      }
    br.close();
  }
} import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader 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 readLine = br.readLine();
      while( readLine != null ) {
        readLine = readLine.trim();
        String[] readLineArray = readLine.split(" ");

        int h = Integer.parseInt(readLineArray[0]);
        int w = Integer.parseInt(readLineArray[1]);

        if ( h == 0 && w == 0) {
          break;
        }

        for (int i = 0 ; i < h ; i++) {
          for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        }
        System.out.print("\n");
        readLine = br.readLine();
      }
    br.close();
  }
} Main public static void main(String args[] ) throws IOException {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

      String readLine = br.readLine();
      while( readLine != null ) {
        readLine = readLine.trim();
        String[] readLineArray = readLine.split(" ");

        int h = Integer.parseInt(readLineArray[0]);
        int w = Integer.parseInt(readLineArray[1]);

        if ( h == 0 && w == 0) {
          break;
        }

        for (int i = 0 ; i < h ; i++) {
          for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        }
        System.out.print("\n");
        readLine = br.readLine();
      }
    br.close();
  } main {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

      String readLine = br.readLine();
      while( readLine != null ) {
        readLine = readLine.trim();
        String[] readLineArray = readLine.split(" ");

        int h = Integer.parseInt(readLineArray[0]);
        int w = Integer.parseInt(readLineArray[1]);

        if ( h == 0 && w == 0) {
          break;
        }

        for (int i = 0 ; i < h ; i++) {
          for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        }
        System.out.print("\n");
        readLine = br.readLine();
      }
    br.close();
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String readLine = br.readLine(); readLine br.readLine() br.readLine br while( readLine != null ) {
        readLine = readLine.trim();
        String[] readLineArray = readLine.split(" ");

        int h = Integer.parseInt(readLineArray[0]);
        int w = Integer.parseInt(readLineArray[1]);

        if ( h == 0 && w == 0) {
          break;
        }

        for (int i = 0 ; i < h ; i++) {
          for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        }
        System.out.print("\n");
        readLine = br.readLine();
      } readLine != null readLine null {
        readLine = readLine.trim();
        String[] readLineArray = readLine.split(" ");

        int h = Integer.parseInt(readLineArray[0]);
        int w = Integer.parseInt(readLineArray[1]);

        if ( h == 0 && w == 0) {
          break;
        }

        for (int i = 0 ; i < h ; i++) {
          for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        }
        System.out.print("\n");
        readLine = br.readLine();
      } readLine = readLine.trim() readLine readLine.trim() readLine.trim readLine String[] readLineArray = readLine.split(" "); readLineArray readLine.split(" ") readLine.split readLine " " int h = Integer.parseInt(readLineArray[0]); h Integer.parseInt(readLineArray[0]) Integer.parseInt Integer readLineArray[0] readLineArray 0 int w = Integer.parseInt(readLineArray[1]); w Integer.parseInt(readLineArray[1]) Integer.parseInt Integer readLineArray[1] readLineArray 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 k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        } int i = 0 ; int i = 0 ; i 0 i < h i h i++ i++ i {
          for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        } {
          for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        } for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          } int k = 0 ; int k = 0 ; k 0 k < w k w k++ k++ k {
            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.print("\n") System.out.print System.out System System.out "\n" readLine = br.readLine() readLine br.readLine() br.readLine br br.close() br.close br String args[] args public class Main {
  public static void main(String args[] ) throws IOException {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

      String readLine = br.readLine();
      while( readLine != null ) {
        readLine = readLine.trim();
        String[] readLineArray = readLine.split(" ");

        int h = Integer.parseInt(readLineArray[0]);
        int w = Integer.parseInt(readLineArray[1]);

        if ( h == 0 && w == 0) {
          break;
        }

        for (int i = 0 ; i < h ; i++) {
          for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        }
        System.out.print("\n");
        readLine = br.readLine();
      }
    br.close();
  }
} public class Main {
  public static void main(String args[] ) throws IOException {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

      String readLine = br.readLine();
      while( readLine != null ) {
        readLine = readLine.trim();
        String[] readLineArray = readLine.split(" ");

        int h = Integer.parseInt(readLineArray[0]);
        int w = Integer.parseInt(readLineArray[1]);

        if ( h == 0 && w == 0) {
          break;
        }

        for (int i = 0 ; i < h ; i++) {
          for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        }
        System.out.print("\n");
        readLine = br.readLine();
      }
    br.close();
  }
} Main
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;

public class Main {
  public static void main(String args[] ) throws IOException {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

      String readLine = br.readLine();
      while( readLine != null ) {
        readLine = readLine.trim();
        String[] readLineArray = readLine.split(" ");

        int h = Integer.parseInt(readLineArray[0]);
        int w = Integer.parseInt(readLineArray[1]);

        if ( h == 0 && w == 0) {
          break;
        }

        for (int i = 0 ; i < h ; i++) {
          for (int k = 0 ; k < w ; k++) {
            System.out.print("#");
          }
          System.out.print("\n");
        }
        System.out.print("\n");
        readLine = br.readLine();
      }
    br.close();
  }
}