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

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