n, m = map(int, input().split())
for i in range(n//2):
    print('-'*(((m-3)//2)-(3*i)), end='')
    print('.', end='')
    print('|..'*i, end='')
    print('|', end='')
    print('..|'*i, end='')
    print('.', end='')
    print('-'*(((m-3)//2)-(3*i)))
print('-'*((m-7)//2), end='')
print('WELCOME', end='')
print('-'*((m-7)//2))
for i in range(n//2)[::-1]:
    print('-'*(((m-3)//2)-(3*i)), end='')
    print('.', end='')
    print('|..'*i, end='')
    print('|', end='')
    print('..|'*i, end='')
    print('.', end='')
    print('-'*(((m-3)//2)-(3*i)))
