#include <bits/stdc++.h>
long long gi() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f ^= ch == '-', ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? x : -x;
}
std::mt19937 rnd(time(NULL));
template <class T>
void cxk(T& a, T b) {
  a = a > b ? a : b;
}
template <class T>
void cnk(T& a, T b) {
  a = a < b ? a : b;
}
std::vector<std::string> ans;
int main() {
  int t = gi();
  while (t--) {
    int n = gi(), m = gi(), swp = 0;
    long long k = gi();
    if (n == 3) swp = 1, std::swap(n, m);
    ans = std::vector<std::string>(n, std::string(m, '.'));
    ans[0] = std::string(m, '*');
    bool nosol = 0;
    for (int i = 1; k && i < n; ++i)
      for (int j = 0; k && j < m; ++j) {
        int s = !j ? 1 : 3 + (j < m - 1);
        if (k >= s)
          k -= s, ans[i][j] = '*';
        else {
          if (j == m - 1) {
            if (i == n - 1)
              nosol = 1;
            else
              ans[i + 1][m - 2] = '*', ans[i + 1][m - 1] = (k == 2 ? '*' : '.');
          } else if (k == 1)
            ans[i][m - 1] = '*';
          else if (j == m - 2) {
            if (i == n - 1)
              nosol = 1;
            else if (j == 1) {
              ans[i + 1][0] = ans[i + 1][1] = '*', ans[i][m - 1] = '*';
              if (k == 3) ans[i + 1][m - 1] = ans[i + 1][m - 2] = '*';
            } else
              ans[i + 1][m - 2] = ans[i + 1][m - 3] = '*',
                             ans[i][m - 1] = (k == 3 ? '*' : '.');
          } else if (k == 2)
            ans[i][m - 2] = '*';
          else if (j == m - 3) {
            if (i == n - 1)
              nosol = 1;
            else
              ans[i][m - 2] = ans[i + 1][m - 2] = ans[i + 1][m - 1] = '*';
          } else
            ans[i][m - 1] = ans[i][m - 3] = '*';
          k = 0;
        }
      }
    if (nosol || k)
      puts("-1");
    else {
      if (swp) std::swap(n, m);
      for (int i = 0; i < n; ++i) {
        for (int j = 0; j < m; ++j) putchar(swp ? ans[j][i] : ans[i][j]);
        puts("");
      }
    }
    if (t) puts("");
  }
  return 0;
}
