row, col = map(int, input().split())
shape = ""
right = False
for n in range(1, row + 1):
if n % 2:
shape += "#" * col + "\n"
right = not right
continue
if right:
shape += "*" * (col - 1) + "#" + "\n"
else:
shape += "#" + "*" * (col - 1) + "\n"
else:
print(shape)
del n