func_code_string: #include <bits/stdc++.h>   const int N = 1e5 + 10;   inline int read() {     int x = 0, f = 0;     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::vector<int> vec[N];   inline int calc(int n, int m) {     int sum = 0;     for (int i = 0; i < n - 1; ++i)       for (int j = 0; j < m - 1; ++j) {         int x = vec[i][j] + vec[i][j + 1] + vec[i + 1][j] + vec[i + 1][j + 1];         sum += x == 3 ? 1 : (x == 4 ? 4 : 0);       }     return sum;   }   inline void solve() {     int n = read(), m = read(), k = read(), flg = 0;     if (4LL * (n - 1) * (m - 1) < k) return puts( -1 ), void();     if (n > m) std::swap(n, m), flg = 1;     for (int i = 0; i < n; ++i) vec[i].resize(m);     for (int i = 0; i < n; ++i)       for (int j = 0; j < m; ++j) vec[i][j] = 0;     if (m < 5) {       int suc = 0;       for (int s = 1; s < (1 << n * m); ++s) {         for (int i = 0; i < n; ++i)           for (int j = 0; j < m; ++j) vec[i][j] = s >> i * m + j & 1;         if (calc(n, m) == k) {           suc = 1;           break;         }       }       if (!suc) return puts( -1 ), void();     } else if (4LL * (n - 1) * (m - 1) == k + 8 && n == 3) {       for (int i = 0; i < n; ++i)         for (int j = 0; j < m; ++j) vec[i][j] = 1;       vec[0][0] = vec[1][0] = vec[2][0] = 0;     } else {       int sum = 0, flg = k ? 0 : 1;       for (int i = 0; i < m; ++i) vec[0][i] = 1;       for (int i = 1; i < n && !flg; ++i)         for (int j = 0; j < m && !flg; ++j) {           int x = j == m - 1 ? 3 : (j ? 4 : 1);           if (sum + x > k) {             int w = k - sum;             if (w == 0) flg = 1;             if (w == 1) {               if (j != m - 1)                 vec[i][m - 1] = flg = 1;               else if (i != n - 1)                 vec[i + 1][0] = flg = 1;             }             if (w == 2) {               if (j <= m - 3)                 vec[i][m - 2] = flg = 1;               else if (i != n - 1)                 vec[i + 1][1] = flg = 1;             }             if (w == 3) {               if (j <= m - 4)                 vec[i][m - 1] = vec[i][m - 3] = flg = 1;               else if (i != n - 1 && j <= m - 3)                 vec[i][m - 2] = vec[i + 1][0] = flg = 1;               else if (i != n - 1 && j <= m - 2)                 vec[i][m - 1] = vec[i + 1][1] = flg = 1;               else if (i != n - 1)                 vec[i + 1][0] = vec[i + 1][2] = flg = 1;             }             if (flg == 0) return puts( -1 ), void();           } else             vec[i][j] = 1, sum += x;         }     }     if (flg) {       for (int i = 0; i < m; ++i, putchar(  n ))         for (int j = 0; j < n; ++j) putchar(vec[j][i] ?  *  :  . );     } else {       for (int i = 0; i < n; ++i, putchar(  n ))         for (int j = 0; j < m; ++j) putchar(vec[i][j] ?  *  :  . );     }   }   int main() {     for (int T = read(); T; putchar(  n ), --T) solve();     return 0;   }   