n, m = map(int, input().split())
for i in range(n):
s = 0
for j in range(m):
if i == 0 or i%2 == 0:
print("#", end = "")
if i == n-1 or i%2 != 0:
if j == 0 and i%4 != 1:
print("#", end = "")
elif i%4 == 1 and j == m - 1:
print("#", end = "")
else:
print("*", end = "")
print()
# flag