#include <bits/stdc++.h>
char a[33340][320], ans[33340][320];
int T, i, j, n, m, k, re, fl, t, z, M;
void dfs(int x, int y, int s) {
  if (fl) return;
  if ((x != 1 || y != 1) && s == k) {
    for (fl = i = 1; i <= n; ++i)
      for (j = 1; j <= m; ++j) ans[i][j] = a[i][j];
    return;
  }
  if (x > n) return;
  if (y > m) return dfs(x + 1, 1, s);
  if (++z > M) return;
  t = 0;
  t += a[x - 1][y] && a[x][y + 1];
  t += a[x][y + 1] && a[x + 1][y];
  t += a[x + 1][y] && a[x][y - 1];
  t += a[x][y - 1] && a[x - 1][y];
  t += a[x][y - 1] && a[x - 1][y - 1];
  t += a[x - 1][y] && a[x - 1][y - 1];
  t += a[x][y + 1] && a[x - 1][y + 1];
  t += a[x - 1][y] && a[x - 1][y + 1];
  t += a[x][y - 1] && a[x + 1][y - 1];
  t += a[x + 1][y] && a[x + 1][y - 1];
  t += a[x][y + 1] && a[x + 1][y + 1];
  t += a[x + 1][y] && a[x + 1][y + 1];
  if (s + t <= k)
    if (x < 2 || y < 2 || a[x - 1][y] || a[x][y - 1]) {
      a[x][y] = 1;
      dfs(x, y + 1, s + t);
      a[x][y] = 0;
    }
  dfs(x, y + 1, s);
}
int main() {
  for (scanf("%d", &T); T--; puts("")) {
    scanf("%d%d%d", &n, &m, &k);
    if (n < m)
      re = 1, z = n, n = m, m = z;
    else
      re = 0;
    M = 8 * n * m, z = fl = 0, dfs(1, 1, 0);
    if (!fl)
      puts("-1");
    else if (re)
      for (j = 1; j <= m; ++j, puts(""))
        for (i = 1; i <= n; ++i) putchar(ans[i][j] ? '*' : '.');
    else
      for (i = 1; i <= n; ++i, puts(""))
        for (j = 1; j <= m; ++j) putchar(ans[i][j] ? '*' : '.');
  }
}
