n,m=map(int,input().split())
ans=True
for i in range(n):
    if i %2==0:
        print('#'*m , end='')
    if ans and i%2==1:
        print('*'*(m-1)+'#' , end='')
        ans=False
    elif ans==False and i%2==1:
        print('#'+'*'*(m-1) , end='')
        ans=True
        
    print()