n, m = map(int, input().split())

for i in range(n):
    x = i%4
    for j in range(m):
        if i%2 == 0:
            print("#", end = "")
        if i%2 != 0:
            if j == 0 and x != 1:
                 print("#", end = "")
              
            elif x == 1 and j == m - 1:
                print("#", end = "")
            else:
                print("*", end = "")
    print()

# flag