#int(input()) #map(int, input().split()) #list(map(int, input().split())) H, W = map(int, input().split()) K = int(input()) from math import gcd N = 2 * H * W // gcd(H, W) K %= N ans = [[0] * W for i in range(H)] for i in range(K): ux, vx = divmod(i, 2*H) uy, vy = divmod(i, 2*W) # if ux % 2 == 1: # vx = 2*H - vx # if uy % 2 == 1: # vy = 2*W - vy vx = min(vx, 2*H-vx-1) vy = min(vy, 2*W-vy-1) # print(H, W, vx, vy) ans[vx][vy] += 1 for i in range(H): a = "" for j in range(W): if ans[i][j] % 2 == 0: a += "." else: a += "#" print(a)