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