#include <bits/stdc++.h>
using namespace std;
int x, y, n, m, k;
vector<char> a[200500];
void go(bool get_next = false) {
  a[x][y] = '*';
  if (get_next) {
    x++;
    if (x == n) {
      x = 0;
      y++;
    }
  }
}
bool solveC() {
  for (int i = 0; i < n; i++) {
    a[i].resize(m + 10, '\0');
    for (int j = 0; j < m; j++) a[i][j] = '.';
    a[i][0] = '*';
  }
  if (k == 0) return true;
  x = 0;
  y = 1;
  while (k) {
    if (y == m) {
      return false;
    }
    int l = 4;
    if (x == 0)
      l = 1;
    else if (x == n - 1)
      l = 3;
    if (k >= l) {
      k -= l;
      go(true);
      continue;
    }
    if (l == 3) {
      if (y == m - 1) return false;
      if (k == 1) {
        x = 0;
        y++;
        go();
        return true;
      }
      y++;
      go();
      x--;
      go();
      return true;
    }
    if (k == 1) {
      x = n - 1;
      go();
      return true;
    }
    if (k == 2) {
      if (x + 1 < n - 1) {
        x++;
        go();
        return true;
      }
      if (y == m - 1) return false;
      x++;
      go();
      y++;
      go();
      x--;
      go();
      return true;
    }
    if (x + 3 <= n - 1) {
      x++;
      go();
      x = n - 1;
      go();
      return true;
    }
    if (y == m - 1) return false;
    if (x + 2 <= n - 1) {
      x++;
      go();
      y++;
      go();
      x++;
      go();
      return true;
    }
    x++;
    go();
    y++;
    go();
    x--;
    go();
    x = 0;
    go();
    return true;
  }
  return true;
}
int main() {
  int t = 1000000;
  scanf("%d", &t);
  for (int q = 0; q < t; q++) {
    if (q) printf("\n");
    n = q % 100;
    n += 3;
    m = (q / 100) % 100;
    m += 3;
    k = q / 1000;
    scanf("%d%d%d", &n, &m, &k);
    int kk = k;
    if (solveC()) {
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) printf("%c", a[i][j]);
        printf("\n");
      }
    } else {
      swap(n, m);
      k = kk;
      if (solveC()) {
        for (int j = 0; j < m; j++) {
          for (int i = 0; i < n; i++) printf("%c", a[i][j]);
          printf("\n");
        }
      } else
        puts("-1");
    }
  }
  return 0;
}
