n,m,x=map(int,input().split()) r=((m-1)//2)*((n-1)//2)*2 if x>m*n-1-r or x0 and count%2) or (count%2==0 and stock<=0): ans[i][j-1]='#' stock-=1 else: ans[i][j+1]='#' else: for j in range(m-2,0,-2): if (stock>0 and count%2) or (count%2==0 and stock<=0): ans[i][j+1]='#' stock-=1 else: ans[i][j-1]='#' count+=1 for i in range(n): print(''.join(ans[i]))