#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, c = getchar(), f = 0;
  for (; c > '9' || c < '0'; f = c == '-', c = getchar())
    ;
  for (; c >= '0' && c <= '9'; x = (x << 1) + (x << 3) + c - '0', c = getchar())
    ;
  return f ? -x : x;
}
inline void write(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + 48);
}
int n, m, k, a[100005][500];
int main() {
  for (int test = read(); test--;) {
    n = read(), m = read(), k = read();
    bool flag = 0;
    if (n < m) swap(n, m), flag = 1;
    for (int i = 1, _y = m; i <= _y; ++i) {
      for (int x = 0, _y = n + 1; x <= _y; ++x)
        for (int y = 0, _y = m + 1; y <= _y; ++y) a[x][y] = 0;
      int cnt = 0;
      for (int y = 1, _y = i; y <= _y; ++y) a[1][y] = 1;
      for (int x = 2, _y = n; x <= _y; ++x)
        for (int y = 1, _y = m; y <= _y; ++y) {
          int ad = a[x - 1][y] * a[x][y - 1] + a[x - 1][y - 1] * a[x][y - 1] +
                   a[x - 1][y] * (a[x - 1][y - 1] + a[x - 1][y + 1]);
          if (cnt + ad <= k && (a[x - 1][y] || a[x][y - 1]))
            cnt += ad, a[x][y] = 1;
        }
      if (cnt == k) goto YES;
    }
    puts("-1\n");
    continue;
  YES:;
    if (flag)
      for (int y = 1, _y = m; y <= _y; ++y) {
        for (int x = 1, _y = n; x <= _y; ++x) putchar(a[x][y] ? '*' : '.');
        puts("");
      }
    else
      for (int x = 1, _y = n; x <= _y; ++x) {
        for (int y = 1, _y = m; y <= _y; ++y) putchar(a[x][y] ? '*' : '.');
        puts("");
      }
    puts("");
  }
}
