#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int &x, int y, int mod = 1000000007) {
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et() {
  puts("-1");
  exit(0);
}
vector<int> A[100035];
void fmain() {
  scanf("%d%d%d", &n, &m, &k);
  bool fg = 0, fd = 0;
  if (n < m) {
    fg = 1;
    swap(n, m);
  }
  for (int i = 0; i <= n + 1; i++) {
    A[i].resize(m + 2, 0);
  }
  for (int s = 1; s <= m; s++) {
    for (int i = 0; i <= n + 1; i++) A[i].assign(m + 2, 0);
    for (int j = 1; j <= s; j++) A[1][j] = 1;
    int cnt = 0;
    for (int i = 2; i <= n; i++) {
      for (int(j) = 1; (j) <= (int)(m); (j)++) {
        int cc = 0;
        if (A[i][j - 1] == 1 && A[i - 1][j - 1] == 1) cc++;
        if (A[i][j - 1] == 1 && A[i - 1][j] == 1) cc++;
        if (A[i - 1][j] == 1 && A[i - 1][j - 1] == 1) cc++;
        if (A[i - 1][j] == 1 && A[i - 1][j + 1] == 1) cc++;
        if (cnt + cc <= k && (A[i][j - 1] == 1 || A[i - 1][j] == 1)) {
          cnt += cc;
          A[i][j] = 1;
        }
      }
    }
    if (cnt == k) {
      fd = 1;
      break;
    }
  }
  if (!fd)
    puts("-1");
  else {
    if (!fg) {
      for (int(i) = 1; (i) <= (int)(n); (i)++) {
        for (int(j) = 1; (j) <= (int)(m); (j)++)
          printf("%c", A[i][j] ? '*' : '.');
        puts("");
      }
    } else {
      for (int(j) = 1; (j) <= (int)(m); (j)++) {
        for (int(i) = 1; (i) <= (int)(n); (i)++)
          printf("%c", A[i][j] ? '*' : '.');
        puts("");
      }
    }
  }
  puts("");
}
int main() {
  int t = 1;
  scanf("%d", &t);
  while (t--) fmain();
  return 0;
}
