Draw a rectangle which has a height of H cm and a width of W cm. Draw a 1-cm square by single '#'.

Constraints

* 1 ≤ H ≤ 300
* 1 ≤ W ≤ 300

Input

The input consists of multiple datasets. Each dataset consists of two integers H and W separated by a single space.

The input ends with two 0 (when both H and W are zero).

Output

For each dataset, print the rectangle made of H × W '#'.

Print a blank line after each dataset.

Example

Input

3 4
5 6
2 2
0 0


Output

####
####
####

######
######
######
######
######

##
##

Source: aizu | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		exit()
	for i in range(H):
		print('#' * W)
	print()


while True:
	(a, b) = map(int, input().split())
	if a != 0 or b != 0:
		for i in range(a):
			print('#' * b)
		print(end='\n')
	else:
		break


while True:
	(x, y) = map(int, input().split())
	if x == 0 and y == 0:
		break
	for i in range(x):
		print('#' * y)
	print('')


while 1:
	(h, w) = map(int, input().split())
	if h == w == 0:
		break
	else:
		for i in range(h):
			print('#' * w)
		print()


while True:
	(tate, side) = map(int, input().split())
	if tate == side == 0:
		break
	print((side * '#' + '\n') * tate)


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for i in range(0, H):
		print('#' * W)
	print()


while True:
	(a, b) = map(int, input().split(' '))
	if not (a or b):
		break
	for i in range(a):
		print('#' * b)
	print()


while True:
	(a, b) = map(int, input().split())
	if a == b == 0:
		break
	for i in range(0, a):
		print('#' * b)
	print()


while True:
	(H, W) = map(int, input().split())
	if H + W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while 1:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for i in range(h):
		print('#' * w)
	print('')


while True:
	(a, b) = input().split()
	if a == b == '0':
		break
	for _ in range(int(a)):
		print('#' * int(b))
	print()


while True:
	(h, w) = list(map(int, input().split()))
	if h == 0:
		break
	print(('#' * w + '\n') * h)


while True:
	(a, b) = map(int, input().split())
	for i in range(a):
		print('#' * b)
	if a == 0 and b == 0:
		break
	print()


while True:
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


while 1:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	print(('#' * w + '\n') * h)


while 1:
	(h, w) = map(int, input().split())
	if h == 0 & w == 0:
		break
	for i in range(h):
		print('#' * w)
	print('')


while True:
	(a, b) = map(int, input().split())
	if a == 0 or b == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


while True:
	(H, W) = [int(i) for i in input().split()]
	if H == W == 0:
		break
	[print('#' * W) for d in range(H)]
	print()


while True:
	HW = input()
	(H, W) = map(int, HW.split())
	if H == 0 and W == 0:
		break
	print(('#' * W + '\n') * H)


while True:
	data = input()
	if data == '0 0':
		break
	(h, w) = map(int, data.split())
	print(('#' * w + '\n') * h)


while True:
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		break
	for i in range(0, a):
		print('#' * b)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	print(('#' * w + '\n') * h)


while 1:
	(h, w) = map(int, input().split())
	if h == w == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while True:
	(h, w) = [int(x) for x in input().split()]
	if h == 0 and w == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while True:
	(H, W) = map(int, input().split())
	if not (H or W):
		break
	for i in range(H):
		print('#' * W)
	print()


while 1:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for i in range(h):
		print('#' * w)
	print('')


while True:
	(h, w) = [int(_) for _ in input().split()]
	if h == 0:
		break
	print(('#' * w + '\n') * h)


while 1:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for _ in range(h):
		print('#' * w)
	print('')


while True:
	(H, W) = [int(i) for i in input().split(' ')]
	if H == W == 0:
		break
	for h in range(H):
		print('#' * W)
	print()


(a, b) = map(int, input().split())
i = 0
while a > 0 or b > 0:
	for i in range(a):
		print('#' * b)
	print()
	(a, b) = map(int, input().split())


while True:
	(H, W) = map(int, input().split())
	if 1 <= H and W <= 300:
		print(H * (W * '#' + '\n'))
	else:
		break


while True:
	(H, W) = [int(i) for i in input().split()]
	if H == W == 0:
		break
	print(('#' * W + '\n') * H)


while True:
	(y, x) = map(int, input().split())
	if x == y == 0:
		break
	print(('#' * x + '\n') * y)


while 1:
	(h, w) = map(int, input().split())
	if h == w == 0:
		exit()
	for i in range(h):
		print('#' * w)
	print()


while True:
	(h, w) = list(map(int, input().split()))
	if h == w and h == 0:
		break
	for t in range(h):
		print('#' * w)
	print('')


while True:
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


while True:
	(H, W) = map(int, input().split())
	if not (H or W):
		break
	print(('#' * W + '\n') * H)


while 1:
	(H, W) = map(int, input().split())
	if [H, W] == [0, 0]:
		break
	for i in range(H):
		print('#' * W)
	print('')


while True:
	(H, W) = map(int, input().split())
	if H + W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == 0:
		break
	print(('#' * W + '\n') * H)


while True:
	(a, b) = map(int, input().split())
	if a * b == 0:
		exit()
	for i in range(a):
		print('#' * b)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0 & w == 0:
		break
	for _ in range(h):
		print('#' * w)
	print('')


while True:
	(H, W) = map(int, input().rsplit())
	if H == 0 and W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == w == 0:
		break
	for _ in range(h):
		print('#' * w)
	print()


while True:
	(a, b) = map(int, input().split())
	if a == b == 0:
		break
	for a in range(a):
		print('#' * b)
	print()


while True:
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		break
	print('\n'.join(['#' * b for _ in range(a)]) + '\n')


while True:
	(h, w) = map(int, input().split())
	if not h == w == 0:
		for i in range(h):
			print('#' * w)
		print('')
	else:
		break


while 1:
	(h, w) = map(int, input().split())
	if h == w == 0:
		break
	for i in range(h):
		print('#' * w)
	print('')


while True:
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		break
	for i in range(a):
		print('#' * b)
	print('')


while True:
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


while True:
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		break
	for j in range(a):
		print('#' * b)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == w and h == 0:
		break
	for i in range(h):
		print('#' * w)
	print('')


while True:
	(H, W) = [int(i) for i in input().split()]
	if H == W == 0:
		break
	for h in range(H):
		print('#' * W)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for i in range(H):
		print('#' * W)
	print('')


while 1:
	(h, w) = [int(x) for x in input().split()]
	if h == 0 and w == 0:
		break
	for i in range(h):
		print('#' * w)
	print('')


while True:
	(h, w) = map(int, input().split())
	if h == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while 1:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for i in range(0, H):
		print('#' * W)
	print()


(a, b) = map(int, input().split())
while a != 0:
	for i in range(a):
		print('#' * b)
	print()
	(a, b) = map(int, input().split())


(H, W) = map(int, input().split())
while not (H == 0 and W == 0):
	for h in range(H):
		print('#' * W)
	print()
	(H, W) = map(int, input().split())


while 1:
	(H, W) = map(int, input().split())
	if (H, W) == (0, 0):
		break
	for _ in range(H):
		print('#' * W)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(a, b) = map(int, input().split())
	if a == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


while True:
	l = list(map(int, input().split()))
	if l[0] == 0 and l[1] == 0:
		break
	else:
		for i in range(l[0]):
			print('#' * l[1])
		print('')


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	print(('#' * w + '\n') * h)


while True:
	(h, w) = map(int, input().split())
	if h == w == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == W == 0:
		break
	for _ in range(H):
		print('#' * W)
	print()


while 1:
	(h, w) = map(int, input().split())
	if (h, w) == (0, 0):
		break
	print('\n'.join(['#' * w for _ in range(h)]), end='\n\n')


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for j in range(h):
		print('#' * w)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for x in range(H):
		print('#' * W)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	print(('#' * w + '\n') * h)


while True:
	(h, w) = map(int, input().split())
	if h == 0 & w == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while 1:
	(h, w) = map(int, input().split())
	if h == w == 0:
		break
	for i in range(h):
		print('#' * w)
	print('')


while 1:
	(H, W) = map(int, input().split())
	if H == W == 0:
		break
	print(('#' * W + '\n') * H)


(H, W) = map(int, input().split())
while not (H == 0 and W == 0):
	for i in range(H):
		print('#' * W)
	print()
	(H, W) = map(int, input().split())


while True:
	(H, W) = map(int, input().split())
	for i in range(H):
		print('#' * W)
	if H == 0 and W == 0:
		break
	print()


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for i in range(0, H):
		print('#' * W)
	print()


while True:
	(a, b) = map(int, input().split())
	if a == b == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


import sys
while 1:
	(H, W) = map(int, sys.stdin.readline().split())
	if H == W == 0:
		break
	print(('#' * W + '\n') * H)


(a, b) = map(int, input().split())
while a or b:
	for i in range(a):
		print('#' * b)
	print()
	(a, b) = map(int, input().split())


while True:
	(a, b) = map(int, input().split())
	if sum([a, b]) == 0:
		break
	for _ in range(a):
		print('#' * b)
	print('')


while True:
	(H, W) = map(int, input().split())
	if (H, W) == (0, 0):
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		break
	for i in range(0, a):
		print('#' * b)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == 0 or W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(h, w) = list(map(int, input().split()))
	if h == w == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == W == 0:
		break
	piece = '#' * W
	for i in range(H):
		print(piece)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == w == 0:
		break
	for _ in range(h):
		print('#' * w)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for _ in range(h):
		print('#' * w)
	print()


while True:
	(H, W) = [int(i) for i in input().split()]
	if H == 0 == W:
		break
	for a in range(H):
		print('#' * W)
	print()


while 1:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for i in range(0, H):
		print(W * '#')
	print('')


while True:
	[h, w] = map(int, input().split())
	if h == 0 and w == 0:
		break
	else:
		print(('#' * w + '\n') * h)


while True:
	(H, W) = [int(i) for i in input().split()]
	if H == W == 0:
		break
	print(('#' * W + '\n') * H)


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	[print('#' * w) for i in range(h)]
	print()


while True:
	(H, W) = map(int, input().split())
	if H == W == 0:
		break
	for i in range(0, H):
		print('#' * W)
	print()


import sys
for l in sys.stdin:
	(H, W) = map(int, l.split())
	if H == 0 and W == 0:
		break
	for h in range(H):
		print(W * '#')
	print('')


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for _ in range(H):
		print('#' * W)
	print()


while True:
	(h, w) = map(int, input().split())
	if h + w == 0:
		break
	for i in range(h):
		print('#' * w)
	print('')


while 1:
	(a, b) = map(int, input().split())
	if a == b == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	rect = ('#' * w + '\n') * h
	print(rect)


while True:
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		break
	for i in range(a):
		print('#' * b)
	print('')


while True:
	(H, W) = map(int, input().split())
	if H == W == 0:
		exit()
	for i in range(H):
		print('#' * W)
	print()


while True:
	(H, W) = list(map(int, input().split()))
	if H == W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(h, w) = map(int, input().split())
	if h + w == 0:
		break
	print('\n'.join(['#' * w for i in range(h)]) + '\n')


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	else:
		for i in range(H):
			print('#' * W)
		print('')


while True:
	(a, b) = map(int, input().split())
	if a == b == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


while 1:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	else:
		print(('#' * W + '\n') * H)


while 1:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0:
		exit()
	[print('#' * w) for i in range(h)]
	print()


while True:
	(x, y) = map(int, input().split())
	if x == y == 0:
		break
	for i in range(x):
		print('#' * y)
	print()


ans = []
while True:
	(H, W) = map(int, input().split())
	if W == H == 0:
		break
	ans.append(('#' * W + '\n') * H)
print('\n'.join(ans))


while True:
	(a, b) = map(int, input().split())
	if a == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


while True:
	[h, w] = map(int, input().split())
	if h == 0 and w == 0:
		break
	print(('#' * w + '\n') * h)


x = '#'
while True:
	(H, W) = map(int, input().split())
	if H * W == 0:
		break
	for i in range(H):
		print(x * W)
	print()


import sys
for line in sys.stdin:
	(H, W) = map(int, line.split())
	if H == 0 and W == 0:
		break
	print(('#' * W + '\n') * H)


while True:
	(h, w) = map(int, input().split())
	if [w, h] == [0, 0]:
		exit()
	for _ in range(h):
		print('#' * w)
	print()


while True:
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


while 1:
	(a, b) = map(int, input().split())
	if a == b == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


while True:
	(H, W) = map(int, input().split(' '))
	if H == W == 0:
		break
	print((W * '#' + '\n') * H)


while True:
	(H, W) = [int(x) for x in input().split()]
	if (H, W) == (0, 0):
		break
	for i in range(H):
		print('#' * W)
	print('')


while True:
	(h, w) = map(int, input().split())
	if int(h) == 0 and int(w) == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while True:
	(h, w) = map(int, input().split())
	if not h and (not w):
		break
	print('\n'.join(['#' * w for x in range(h)]) + '\n')


while True:
	(H, W) = [int(x) for x in input().split()]
	if H == 0 and W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for i in range(H):
		print(W * '#')
	print('')


while True:
	x = list(map(int, input().split()))
	if x[0] == 0 and x[1] == 0:
		break
	else:
		for i in range(x[0]):
			print('#' * x[1])
	print('')


while 1:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for i in range(H):
		print('#' * W)
	print('')


while True:
	(H, W) = [int(i) for i in input().split()]
	if H == W == 0:
		break
	print(('#' * W + '\n') * H)


m = '#'
while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for _ in range(h):
		print(m * w)
	print()


while True:
	(y, x) = [int(i) for i in input().split()]
	if y == 0:
		break
	for i in range(y):
		print('#' * x)
	print()


while True:
	(h, w) = map(int, input().split())
	if w == 0 and h == 0:
		break
	for _ in range(h):
		print('#' * w)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(H, W) = map(int, input().split())
	if W == H == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


(h, w) = [int(i) for i in input().split()]
while h or w:
	print(('#' * w + '\n') * h)
	(h, w) = [int(i) for i in input().split()]


while True:
	(a, b) = input().split()
	if a == '0' and b == '0':
		break
	for i in range(int(a)):
		print('#' * int(b))
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0:
		break
	for _ in range(h):
		print(''.join(['#'] * w))
	print('')


import sys
for i in sys.stdin.readlines()[:-1]:
	(h, w) = map(int, i.strip().split())
	print(('#' * w + '\n') * h)


while True:
	(H, W) = map(int, input().split())
	if H == W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for i in range(h):
		print('#' * w)
	print('')


while 1:
	(H, W) = [int(i) for i in input().split()]
	if H == 0 and W == 0:
		break
	for i in range(0, H):
		print('#' * W)
	print()


while True:
	(H, W) = [int(i) for i in input().split()]
	if H == W == 0:
		break
	for h in range(H):
		print('#' * W)
	print()


for e in iter(input, '0 0'):
	(h, w) = map(int, e.split())
	print(('#' * w + '\n') * h)


while True:
	(h, w) = list(map(int, input().split()))
	if h == w == 0:
		break
	print(('#' * w + '\n') * h)


while True:
	(H, W) = [int(x) for x in input().split()]
	if H == W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0:
		break
	print(('#' * w + '\n') * h)


while True:
	(a, b) = map(int, input().split())
	if a | b == 0:
		break
	print(('#' * b + '\n') * a)


while True:
	(H, M) = map(int, input().split())
	if H == 0 and M == 0:
		break
	else:
		for i in range(H):
			print('#' * M)
		print('')


while True:
	(a, b) = map(int, input().split())
	if a == b and a == 0:
		break
	for i in range(a):
		print('#' * b)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for s in range(H):
		print('#' * W)
	print()


while True:
	line = list(map(int, input().split()))
	if line == [0, 0]:
		break
	for i in range(line[0]):
		print('#' * line[1])
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for x in range(h):
		print('#' * w)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == W == 0:
		break
	print(('#' * W + '\n') * H)


while True:
	(W, H) = tuple(map(int, input().split()))
	if W == 0 & H == 0:
		break
	for i in range(W):
		print('#' * H)
	print('')


while True:
	(H, W) = map(int, input().split())
	if H == W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while 1:
	(a, b) = map(int, input().split())
	if a == b == 0:
		break
	print(('#' * b + '\n') * a)


while True:
	(W, H) = map(int, input().split())
	if W == 0 and H == 0:
		break
	for i in range(W):
		print('#' * H)
	print()


while True:
	(a, b) = map(int, input().split())
	if a == b == 0:
		break
	for j in range(a):
		print('#' * b)
	print()


while True:
	(x, y) = map(int, input().split())
	if (x, y) == (0, 0):
		break
	for i in range(x):
		print('#' * y)
	print()


while True:
	(a, b) = map(int, input().split())
	if a == 0 & b == 0:
		break
	else:
		for i in range(a):
			print('#' * b)
		print()


while True:
	(H, W) = map(int, input().split())
	if H == 0 & W == 0:
		break
	for i in range(H):
		print('#' * W)
	print('')


while True:
	(H, W) = map(int, input().split())
	if H == 0 or W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while True:
	(h, w) = [int(i) for i in input().split()]
	if w == h == 0:
		break
	print(('#' * w + '\n') * h)


import sys
l = sys.stdin.readlines()[:-1]
for i in l:
	(h, w) = map(int, i.strip().split())
	print(('#' * w + '\n') * h)


(x, y) = map(int, input().split())
while not (x == 0 and y == 0):
	print(x * (y * '#' + '\n'))
	(x, y) = map(int, input().split())


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for _ in range(h):
		print('#' * w)
	print('')


while True:
	(H, W) = list(map(int, input().split()))
	if H == 0 & W == 0:
		break
	print(('#' * W + '\n') * H)


while True:
	(h, w) = map(int, input().split())
	if w == 0 and h == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


for e in list(open(0))[:-1]:
	(h, w) = map(int, e.split())
	print(('#' * w + '\n') * h)


while True:
	(H, W) = map(int, input().split())
	if (H, W) == (0, 0):
		break
	print(*('#' * W for i in range(H)), '', sep='\n')


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	print(('#' * W + '\n') * H)


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while 1:
	(w, h) = map(int, input().split())
	if w == 0 and h == 0:
		break
	for a in range(w):
		print('#' * h)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == W == 0:
		break
	for h in range(H):
		print('#' * W)
	print('')


while True:
	(H, W) = [int(i) for i in input().split()]
	if H == 0 and W == 0:
		break
	else:
		for i in range(H):
			print('#' * W)
		print('')


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		quit()
	for i in range(h):
		print('#' * w)
	print()


while True:
	(h, w) = map(int, input().strip().split())
	if h == w == 0:
		break
	print(('#' * w + '\n') * h)


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	print(('#' * W + '\n') * H)


while True:
	(h, w) = map(int, input().split(' '))
	if h == 0 and w == 0:
		break
	print(('#' * w + '\n') * h)


while True:
	(H, W) = map(int, input().split(' '))
	if H == 0 and W == 0:
		break
	[print(*['#' * W]) for _ in range(H)]
	print()


while 1:
	(H, W) = list(map(int, input().split()))
	if H == W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(H, W) = [int(x) for x in input().split()]
	if H == W == 0:
		break
	print(('#' * W + '\n') * H)


while True:
	(H, W) = [int(x) for x in input().split()]
	if H == W == 0:
		break
	print(('#' * W + '\n') * H)


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for i in range(0, H):
		print('#' * W)
	print('')


while 1:
	(a, b) = map(int, input().split())
	if not a + b:
		break
	for i in range(a):
		print('#' * b)
	print()


S = list(map(int, open(0).read().split()))[:-2]
for (h, w) in zip(*[iter(S)] * 2):
	for _ in range(h):
		print('#' * w)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == w == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while True:
	WH = input().split()
	if WH[0] == '0':
		break
	for i in range(int(WH[0])):
		print('#' * int(WH[1]))
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for i in range(h):
		print(w * '#')
	print()


while True:
	(h, w) = [int(i) for i in input().split()]
	if h == 0 and w == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while 1:
	(h, w) = map(int, input().split())
	if h == 0:
		break
	print(('#' * w + '\n') * h)


while True:
	(h, w) = map(int, input().split())
	if h == w == 0:
		break
	print(('#' * w + '\n') * h)


while True:
	(H, W) = map(int, input().split())
	if H == W == 0:
		exit()
	for _ in range(H):
		print('#' * W)
	print()


while True:
	(H, W) = map(int, input().split())
	if H == W == 0:
		break
	for i in range(H):
		print('#' * W)
	print()


while True:
	(h, w) = map(int, input().split())
	if h + w == 0:
		break
	print(('#' * w + '\n') * h)


while True:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	else:
		print('\n'.join(['#' * W for x in range(H)]) + '\n')


for e in iter(input, '0 0'):
	(H, W) = map(int, e.split())
	for i in range(H):
		print('#' * W)
	print('')


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	for i in range(h):
		print('#' * w)
	print()


while True:
	(h, w) = map(int, input().split())
	if h == 0 and w == 0:
		break
	i = 0
	for i in range(h):
		print('#' * w)
	print()


while 1:
	(H, W) = map(int, input().split())
	if H == 0 and W == 0:
		break
	for _ in range(H):
		print('#' * W)
	print('')