Problem: Today Peter has got an additional homework for tomorrow. The teacher has given three integers to him: n, m and k, and asked him to mark one or more squares on a square grid of size n × m. 

The marked squares must form a connected figure, and there must be exactly k triples of marked squares that form an L-shaped tromino — all three squares are inside a 2 × 2 square.

The set of squares forms a connected figure if it is possible to get from any square to any other one if you are allowed to move from a square to any adjacent by a common side square.

Peter cannot fulfill the task, so he asks you for help. Help him to create such figure.

Input

Input data contains one or more test cases. The first line contains the number of test cases t (1 ≤ t ≤ 100).

Each of the following t test cases is described by a line that contains three integers: n, m and k (3 ≤ n, m, n × m ≤ 105, 0 ≤ k ≤ 109).

The sum of values of n × m for all tests in one input data doesn't exceed 105.

Output

For each test case print the answer.

If it is possible to create such figure, print n lines, m characters each, use asterisk '*' to denote the marked square, and dot '.' to denote the unmarked one.

If there is no solution, print -1.

Print empty line between test cases.

Example

Input

3
3 3 4
3 3 5
3 3 3


Output

.*.
***
.*.

**.
**.
*..

.*.
***
*..

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int Max = 1e5;
int t, n, m, K, a[320][Max + 5];
inline int Read() {
  int num = 0;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    ;
  for (; ch >= '0' && ch <= '9'; num = num * 10 + ch - '0', ch = getchar())
    ;
  return num;
}
inline int Ask(int x, int y) {
  int tot = 0;
  if (a[x][y] && a[x - 1][y] && a[x][y - 1]) ++tot;
  if (a[x][y] && a[x - 1][y] && a[x][y + 1]) ++tot;
  if (a[x][y] && a[x + 1][y] && a[x][y - 1]) ++tot;
  if (a[x][y] && a[x + 1][y] && a[x][y + 1]) ++tot;
  return tot;
}
int main() {
  t = Read();
  for (; t--; puts("")) {
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++) a[i][j] = 0;
    n = Read(), m = Read(), K = Read();
    int tot = n * m, ans = 0;
    if (n < 5 && m < 5) {
      for (int i = 0; i < 1 << tot; i++) {
        ans = 0;
        for (int j = 1; j <= tot; j++) {
          int x = (j - 1) / m + 1, y = (j - 1) % m + 1;
          a[x][y] = (i >> (j - 1)) & 1;
        }
        a[1][1] = 1;
        for (int j = 1; j <= n; j++)
          for (int k = 1; k <= m; k++) ans += Ask(j, k);
        if (ans == K) {
          for (int j = 1; j <= n; j++) {
            for (int k = 1; k <= m; k++) putchar(a[j][k] ? '*' : '.');
            puts("");
          }
          break;
        }
      }
      if (ans ^ K) puts("-1");
      continue;
    }
    int flg = 0, Ed = 0, pos = 2, lst = K;
    if (n > m) flg = 1, swap(n, m);
    if (n == 3 && K == 4 * (n - 1) * (m - 1) - 8) {
      for (int i = 1; i <= n; i++)
        for (int j = 1; j < m; j++) a[i][j] = 1;
    } else {
      for (int i = 1; i <= m; i++) a[1][i] = 1;
      for (int i = 2; i <= n && !Ed; i++)
        for (int j = 1; j <= m && !Ed; j++)
          if (K - (j == 1 ? 1 : (j == m ? 3 : 4)) >= 0 &&
              (i != n || m - j + 1 >= 5))
            a[i][j] = 1, K -= (j == 1 ? 1 : (j == m ? 3 : 4)), pos = i + 1;
          else
            Ed = 1;
      if (pos <= n) {
        if (K == 1) {
          if (a[pos - 1][2])
            a[pos][1] = 1;
          else
            a[pos - 1][m] = 1;
        }
        if (K == 2) {
          if (!a[pos - 1][m - 2])
            a[pos - 1][m - 1] = 1;
          else
            a[pos][2] = 1;
        }
        if (K == 3) {
          if (a[pos - 1][4])
            a[pos][1] = a[pos][3] = 1;
          else if (a[pos - 1][3])
            a[pos][1] = a[pos - 1][m] = a[pos][m] = a[pos][m - 1] = 1;
          else if (a[pos - 1][2])
            a[pos][1] = a[pos - 1][m - 1] = 1;
          else
            a[pos - 1][m - 2] = a[pos - 1][m] = 1;
        }
      } else {
        if (K == 1) a[n][m] = 1;
        if (K == 2) a[n][m - 1] = 1;
        if (K == 3) a[n][m - 2] = a[n][m] = 1;
        if (K == 4) a[n][m - 3] = 1;
        if (K == 5) a[n][m - 3] = a[n][m] = 1;
        if (K == 6) a[n][m - 3] = a[n][m - 1] = 1;
        if (K == 8) a[n][m - 3] = a[n][m - 2] = 1;
        if (K == 9) a[n][m - 3] = a[n][m - 2] = a[n][m] = 1;
        if (K == 12) a[n][m - 3] = a[n][m - 2] = a[n][m - 1] = 1;
        if (K == 15) a[n][m - 3] = a[n][m - 2] = a[n][m - 1] = a[n][m] = 1;
      }
    }
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++) ans += Ask(i, j);
    if (ans == lst) {
      if (flg) {
        for (int i = 1; i <= m; i++) {
          for (int j = 1; j <= n; j++) putchar(a[j][i] ? '*' : '.');
          puts("");
        }
      } else {
        for (int i = 1; i <= n; i++) {
          for (int j = 1; j <= m; j++) putchar(a[i][j] ? '*' : '.');
          puts("");
        }
      }
    } else
      puts("-1");
  }
  return 0;
}