#include <bits/stdc++.h>
using namespace std;
int n, m, k;
vector<vector<int> > v;
bool transponer;
void escribe() {
  if (transponer) {
    vector<vector<int> > nextv(m + 2, vector<int>(n + 2, 0));
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++) nextv[j][i] = v[i][j];
    swap(n, m);
    v = nextv;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++)
      if (v[i][j])
        cout << "*";
      else
        cout << ".";
    cout << endl;
  }
}
int valor(int i, int j) {
  if (i == 1) return 0;
  if (j == 1) return 1;
  if (j == m) return 3;
  return 4;
}
void genera() {
  int act = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (act + valor(i, j) > k) {
        int resta = k - act;
        if (resta == 1) {
          if (m > j)
            v[i][m] = 1;
          else
            v[i + 1][1] = 1;
        } else if (resta == 2) {
          if (m - j + 1 >= 3)
            v[i][m - 1] = 1;
          else if (m - j + 1 == 2)
            v[i][m] = v[i + 1][m] = v[i + 1][m - 1] = 1;
          else
            v[i + 1][2] = 1;
        } else {
          if (m - j + 1 >= 4)
            v[i][m] = v[i][m - 2] = 1;
          else if (j == 2) {
            if (i < n)
              v[i][m] = v[i + 1][m] = v[i + 1][m - 1] = v[i + 1][1] =
                  v[i + 1][2] = 1;
            else {
              v[i][1] = 0;
              v[i][2] = v[i][4] = 1;
            }
          } else
            v[i][m] = v[i + 1][m] = v[i + 1][m - 1] = v[i + 1][1] = 1;
        }
        escribe();
        return;
      }
      v[i][j] = 1;
      act += valor(i, j);
      if (act == k) {
        escribe();
        return;
      }
    }
  }
}
int main() {
  int casos;
  cin >> casos;
  for (int cas = 0; cas < casos; cas++) {
    if (cas > 0) cout << endl;
    cin >> n >> m >> k;
    transponer = false;
    if (n > m) {
      swap(n, m);
      transponer = true;
    }
    v = vector<vector<int> >(n + 2, vector<int>(m + 2, 0));
    int total = (n - 1) + (n - 1) * (m - 2) * 4 + (n - 1) * 3;
    if (k > total or k == total - 1 or k == total - 2 or k == total - 4 or
        k == total - 5) {
      cout << -1 << endl;
      continue;
    }
    if (k == total - 8) {
      if (n > 3) {
        cout << -1 << endl;
        continue;
      }
      for (int i = 1; i <= n; i++)
        for (int j = 1; j <= m - 1; j++) v[i][j] = 1;
      escribe();
      continue;
    }
    if (m == 3 and k == 7) {
      for (int i = 1; i <= 3; i++)
        for (int j = 1; j <= 3; j++) v[i][j] = 1;
      v[1][1] = v[3][1] = v[1][3] = 0;
      escribe();
      continue;
    }
    genera();
  }
}
