#include <bits/stdc++.h>
using namespace std;
int t, n, m, k, Ans, T;
int B[200010];
char A[200010];
inline int calc(int x, int y) {
  int ret = 0;
  if (x - 1 > 0 && y + 1 <= m && A[((x - 1 - 1) * m + y)] == '*' &&
      A[((x - 1 - 1) * m + y + 1)] == '*')
    ret++;
  if (x - 1 > 0 && y - 1 > 0 && A[((x - 1 - 1) * m + y)] == '*' &&
      A[((x - 1 - 1) * m + y - 1)] == '*')
    ret++;
  if (x - 1 > 0 && y - 1 > 0 && A[((x - 1) * m + y - 1)] == '*' &&
      A[((x - 1 - 1) * m + y - 1)] == '*')
    ret++;
  if (x - 1 > 0 && y - 1 > 0 && A[((x - 1) * m + y - 1)] == '*' &&
      A[((x - 1 - 1) * m + y)] == '*')
    ret++;
  return ret;
}
inline bool link(int x, int y) {
  if (x - 1 > 0 && A[((x - 1 - 1) * m + y)] == '*') return true;
  if (x + 1 <= n && A[((x + 1 - 1) * m + y)] == '*') return true;
  if (y - 1 > 0 && A[((x - 1) * m + y - 1)] == '*') return true;
  if (y + 1 <= m && A[((x - 1) * m + y + 1)] == '*') return true;
  return false;
}
bool S(int x, int y, int s) {
  if ((++T) > 10 * n * m) return 0;
  if (s == k) return 1;
  if (x > n) return 0;
  if (y > m) return S(x + 1, 1, s);
  int now = calc(x, y);
  if ((x == 1 && y == 1) || link(x, y))
    if (s + now <= k) {
      A[((x - 1) * m + y)] = '*';
      if (S(x, y + 1, s + now)) return 1;
    }
  A[((x - 1) * m + y)] = '.';
  return S(x, y + 1, s);
}
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d%d", &n, &m, &k);
    T = 0;
    int c = 0;
    if (n < m) {
      c = 1;
      swap(n, m);
    }
    for (int i = 1; i <= n * m; i++) A[i] = '.';
    if (!S(1, 1, 0))
      puts("-1\n");
    else {
      int E = 1;
      for (int i = 1; i <= n * m; i++)
        if (A[i] == '*') E = 0;
      if (E) A[1] = '*';
      if (!c)
        for (int i = 1; i <= n; i++, putchar('\n'))
          for (int j = 1; j <= m; j++) putchar(A[((i - 1) * m + j)]);
      else
        for (int i = 1; i <= m; i++, putchar('\n'))
          for (int j = 1; j <= n; j++) putchar(A[((j - 1) * m + i)]);
      putchar('\n');
    }
  }
  return 0;
}
