#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int n, m, k;
std::vector<std::vector<int> > a;
int cur;
bool add(int x, int y) {
  if (x == 0) {
    a[x][y] = 1;
    return true;
  }
  if (y == 0) {
    if (a[x - 1][0] + a[x - 1][1] == 2) cur++;
    a[x][y] = 1;
    return true;
  }
  int inc = 0;
  if (a[x - 1][y] + a[x - 1][y - 1] == 2) inc++;
  if (a[x][y - 1] + a[x - 1][y - 1] == 2) inc++;
  if (a[x - 1][y] + a[x][y - 1] == 2) inc++;
  if (y < m - 1 && a[x - 1][y] + a[x - 1][y + 1] == 2) inc++;
  if (inc == 0) {
    if (a[x][y - 1] == 0 && a[x - 1][y] == 0 && y == m - 1) return false;
  }
  if (cur + inc <= k) {
    cur += inc;
    a[x][y] = 1;
    return true;
  } else
    return false;
}
int main() {
  int t;
  cin >> t;
  for (int aff = 0; aff < t; aff++) {
    cin >> n >> m >> k;
    cur = 0;
    a = std::vector<std::vector<int> >(n, std::vector<int>(m, 0));
    int best = (n - 1) * (m - 1) * 4;
    if (k > best || k == best - 1 || k == best - 2 || k == best - 5 ||
        k == best - 4) {
      printf("-1\n");
      if (aff < t - 1) printf("\n");
      continue;
    }
    if (k == best - 8) {
      if (m > 3 && n > 3) {
        printf("-1\n");
        if (aff < t - 1) printf("\n");
        continue;
      }
      for (int i = 0; i < n; i++)
        for (int j = 0; j < m; j++) {
          a[i][j] = 1;
        }
      if (n == 3) {
        for (int i = 0; i < 3; i++) a[i][0] = 0;
      } else if (m == 3) {
        for (int i = 0; i < 3; i++) a[0][i] = 0;
      }
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
          if (a[i][j])
            printf("*");
          else
            printf(".");
        }
        printf("\n");
      }
      if (aff < t - 1) printf("\n");
      continue;
    }
    bool f = false;
    for (int i = 0; i < n; i++) {
      if (cur == k) break;
      for (int j = 0; j < m; j++) {
        add(i, j);
        if (cur == k) break;
      }
    }
    if (k == 0) add(0, 0);
    if (cur < k) {
      if (a[n - 2][m - 1] == 0) {
        a[n - 1][0] = 0;
        a[n - 1][1] = 1;
        a[n - 1][2] = 1;
        cur = k;
      }
    }
    if (cur < k) {
      printf("-1\n");
      if (aff < t - 1) printf("\n");
      continue;
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (a[i][j])
          printf("*");
        else
          printf(".");
      }
      printf("\n");
    }
    if (aff < t - 1) printf("\n");
  }
}
