while True:
    H, W = [int(i) for i in input().split()]
    if H == W == 0:
        break

    for h in range(H):
        for w in range(W):
            if h == w - 1 or w == h -1 or h == h - 2 or w == h - 3 or h == w - 3:
                print('#', end='')
            else:
                print('.', end='')

        print()

    print()