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>
#pragma warning(disable : 4996)
using namespace std;
int n, m, p;
void doprint(vector<vector<int>> &a, int swapy) {
  if (!swapy) {
    for (auto e : a) {
      for (auto f : e) printf("%c", f ? '*' : '.');
      printf("\n");
    }
  } else {
    for (int i = 0; i < a[0].size(); i++) {
      for (int j = 0; j < a.size(); j++) {
        printf("%c", a[j][i] ? '*' : '.');
      }
      printf("\n");
    }
  }
}
int dodo() {
  int i, j, k, l;
  cin >> n >> m >> p;
  vector<vector<int>> a;
  a.resize(n);
  for (i = 0; i < n; i++) a[i].resize(m);
  if (p == 0) {
    a[0][0] = 1;
    doprint(a, 0);
    return 0;
  }
  if (n <= 4 && m <= 4) {
    for (i = 1; i < (1 << n * m); i++) {
      for (j = 0; j < n * m; j++) a[j / m][j % m] = !!(i & (1 << j));
      int cnt = 0;
      for (j = 0; j < n - 1; j++)
        for (k = 0; k < m - 1; k++) {
          int u = a[j][k] + a[j][k + 1] + a[j + 1][k] + a[j + 1][k + 1];
          if (u == 3)
            cnt++;
          else if (u == 4)
            cnt += 4;
        }
      if (cnt == p) {
        for (j = 0; j < n; j++) {
          for (k = 0; k < m; k++) printf("%c", a[j][k] ? '*' : '.');
          printf("\n");
        }
        return 0;
      }
    }
    return !printf("-1\n");
  }
  int swapy = 0;
  if (m <= 4) swap(n, m), swapy = 1;
  a.resize(n);
  for (i = 0; i < n; i++) a[i].resize(m);
  if (n == 3 && p == 4 * (n - 1) * (m - 1) - 8) {
    for (i = 1; i < m; i++)
      for (j = 0; j < 3; j++) a[j][i] = 1;
    doprint(a, swapy);
    return 0;
  }
  int now = 0;
  for (i = 0; i < m; i++) a[0][i] = 1;
  for (i = 1; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (i == n - 1 && j == m - 4) break;
      a[i][j] = 1;
      if (j == 0)
        now++;
      else if (j == m - 1)
        now += 3;
      else
        now += 4;
      if (p - now < 4) {
        if (i < n - 1) {
          if (p - now == 0)
            ;
          else if (p - now == 1) {
            if (j >= 1)
              a[i + 1][0] = 1;
            else
              a[i][m - 1] = 1;
          } else if (p - now == 2) {
            if (j == 0)
              a[i][m - 1] = a[i + 1][0] = a[i + 1][1] = 1;
            else if (j == 1)
              a[i + 1][0] = a[i][m - 1] = 1;
            else
              a[i + 1][0] = a[i + 1][j] = 1;
          } else {
            if (j == 0)
              a[i + 1][0] = a[i + 1][1] = a[i][m - 2] = 1;
            else if (j == 1)
              a[i + 1][0] = a[i][m - 2] = 1;
            else if (j == 2)
              a[i + 1][1] = a[i][m - 1] = 1;
            else
              a[i + 1][0] = a[i + 1][j - 1] = 1;
          }
          doprint(a, swapy);
          return 0;
        } else {
          if (p - now == 0)
            ;
          else if (p - now == 1)
            a[i][m - 1] = 1;
          else if (p - now == 2)
            a[i][m - 2] = 1;
          else if (p - now == 3)
            a[i][m - 3] = a[i][m - 1] = 1;
          doprint(a, swapy);
          return 0;
        }
      }
    }
  }
  map<int, string> mq;
  mq[0] = "0000";
  mq[1] = "0001";
  mq[2] = "0010";
  mq[3] = "0101";
  mq[4] = "1000";
  mq[5] = "1001";
  mq[6] = "1010";
  mq[8] = "1100";
  mq[9] = "1101";
  mq[12] = "1110";
  mq[15] = "1111";
  if (mq.count(p - now)) {
    for (i = 0; i < 4; i++) a[n - 1][m - 4 + i] = mq[p - now][i] - '0';
    doprint(a, swapy);
  } else
    return !printf("-1\n");
}
int main() {
  int i, j, k, l;
  int T;
  cin >> T;
  while (T--) {
    dodo();
    printf("\n");
  }
  return 0;
}