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 maxn = 1e5 + 5;
char str[maxn], *beg[maxn];
int n, m, K, T;
bool solve(int n, int m, int k) {
  int c = 4 * (n - 1) * (m - 1);
  for (int i = 1; i <= (n); i++) beg[i] = str + (i - 1) * m;
  for (int i = 1; i <= (n); i++)
    for (int j = 1; j <= (m); j++) beg[i][j] = '*';
  if (k == c) {
    for (int i = 1; i <= (n); i++) {
      for (int j = 1; j <= (m); j++) printf("%c", beg[i][j]);
      printf("\n");
    }
    printf("\n");
    return true;
  };
  if (k == c - 3) {
    beg[1][1] = '.';
    {
      for (int i = 1; i <= (n); i++) {
        for (int j = 1; j <= (m); j++) printf("%c", beg[i][j]);
        printf("\n");
      }
      printf("\n");
      return true;
    };
  }
  if (k == c - 6) {
    beg[1][2] = '.';
    {
      for (int i = 1; i <= (n); i++) {
        for (int j = 1; j <= (m); j++) printf("%c", beg[i][j]);
        printf("\n");
      }
      printf("\n");
      return true;
    };
  }
  if (k == c - 7) {
    beg[1][1] = beg[1][2] = '.';
    {
      for (int i = 1; i <= (n); i++) {
        for (int j = 1; j <= (m); j++) printf("%c", beg[i][j]);
        printf("\n");
      }
      printf("\n");
      return true;
    };
  }
  if (k == c - 8 && n == 3) {
    beg[1][1] = beg[2][1] = beg[3][1] = '.';
    {
      for (int i = 1; i <= (n); i++) {
        for (int j = 1; j <= (m); j++) printf("%c", beg[i][j]);
        printf("\n");
      }
      printf("\n");
      return true;
    };
  }
  if (k == c - 8 && m == 3) {
    beg[1][1] = beg[1][2] = beg[1][3] = '.';
    {
      for (int i = 1; i <= (n); i++) {
        for (int j = 1; j <= (m); j++) printf("%c", beg[i][j]);
        printf("\n");
      }
      printf("\n");
      return true;
    };
  }
  if (k >= c - 8) {
    printf("-1\n\n");
    return false;
  };
  for (int i = 2; i <= n; i++)
    for (int j = 1; j <= (m); j++) beg[i][j] = '.';
  int row = 2, a = 0, b = m;
  while (true) {
    int cov = (a == 0 ? 1 : (b == 1 ? 3 : 4));
    if (k < cov) break;
    k -= cov;
    beg[row][a + 1] = '*';
    a++;
    b--;
    if (b == 0) a = 0, b = m, ++row;
  }
  if (k == 1) {
    if (b >= 2)
      beg[row][m] = '*';
    else
      beg[row + 1][1] = '*';
  }
  if (k == 2) {
    if (b >= 3)
      beg[row][m - 1] = '*';
    else if (a >= 2)
      beg[row + 1][a] = beg[row + 1][a + 1] = '*';
    else if (a == 1)
      beg[row][1] = '.', beg[row][2] = beg[row + 1][2] = beg[row + 1][3] = '*';
  }
  if (k == 3) {
    if (a >= 2 && b >= 4)
      beg[row][1] = '.', beg[row][a + 2] = beg[row][a + 3] = '*';
    else if (a == 0) {
      if (b >= 4)
        beg[row][1] = beg[row][3] = '*';
      else
        beg[row][2] = beg[row + 1][2] = beg[row + 1][3] = '*';
    } else if (a == 1) {
      if (b >= 4)
        beg[row][3] = beg[row][m] = '*';
      else
        beg[row][1] = '.',
        beg[row][2] = beg[row + 1][1] = beg[row + 1][2] = beg[row + 1][3] = '*';
    } else if (b == 1)
      beg[row][m] = '*';
    else if (b >= 2)
      beg[row + 1][a] = beg[row + 1][a + 1] = beg[row][m] = '*';
  }
  int cnt = 0;
  for (int i = 1; i <= (n - 1); i++)
    for (int j = 1; j <= (m - 1); j++) {
      int tmp = 0;
      tmp += beg[i][j] == '*';
      tmp += beg[i][j + 1] == '*';
      tmp += beg[i + 1][j] == '*';
      tmp += beg[i + 1][j + 1] == '*';
      if (tmp >= 3) cnt += (tmp == 4 ? 4 : 1);
    }
  if (cnt != K) cerr << "Construction Error!" << n << m << k << endl;
  {
    for (int i = 1; i <= (n); i++) {
      for (int j = 1; j <= (m); j++) printf("%c", beg[i][j]);
      printf("\n");
    }
    printf("\n");
    return true;
  };
}
int main() {
  for (cin >> T; T--;) {
    cin >> n >> m >> K;
    solve(n, m, K);
  }
  return 0;
}