#include<iostream>
#include<algorithm>
#include<string>
#include<cstdio>
using namespace std;
#define ll long long
ll m, n, i, j,ans=0,cnt=0;
char a[105][105];
int dx[] = {-1,0,1,0};
int dy[] = {0,1,0,-1};
void dfs(int x, int y,int k)
{
if (cnt == ans)return;
if (a[x][y] == '.')
{
a[x][y] = '#';
k++;
cnt++;
}
else {
a[x][y] = '.';
k--;
cnt++;
}
if (k > 3)k = 0;
else if (k < 0)k = 3;
x += dx[k];
y += dy[k];
if (x < 1) x = m;
else if (x > m)x = 1;
if (y < 1)y = n;
else if (y > n)y = 1;
dfs(x, y, k);
}
int main()
{
cin >> m >> n >> ans;
for (int i = 1;i <= m;i++)
{
for (int j = 1;j <= n;j++)
{
a[i][j] = '.';
}
cout << endl;
}
dfs(1, 1, 0);
for (int i = 1;i <= m;i++)
{
for (int j = 1;j <= n;j++)
{
cout<<a[i][j] ;
}
cout << endl;
}
}