n, k = map(int, input().split()) EPS = 1e-6 for i in range(1, 2001): if n / min(k, i) <= i + EPS: k = min(k, i) at = 0 cnt = 0 r = [(max(j * k, n), max((j + 1) * k, n)) for j in range(k)] for x in range(k): for y in range(k): ans = '.' if r[y][1] % k > r[y][0] % k: if r[y][1] % k > x and x >= r[y][0] % k: ans = '#' elif x >= r[y][0] % k or r[y][1] % k > x: ans = '#' print(ans, end="") print() break