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 N = 100005;
int n, m, K;
int w[N];
inline int count() {
  int ret = 0;
  for (int i = 0; i < n - 1; i++)
    for (int j = 0; j < m - 1; j++) {
      int x = i * m + j;
      ret +=
          (w[x] & w[x + m] & w[x + 1]) + (w[x + m + 1] & w[x + m] & w[x + 1]) +
          (w[x] & w[x + m] & w[x + m + 1]) + (w[x] & w[x + 1] & w[x + m + 1]);
    }
  return ret;
}
int Q[N], l, r;
int ins[N];
const int dx[] = {0, 0, 1, -1};
const int dy[] = {1, -1, 0, 0};
inline int Jud() {
  l = r = -1;
  for (int i = 0; i < n * m; i++) ins[i] = 0;
  for (int i = 0; i < n * m; i++)
    if (w[i]) {
      Q[++r] = i;
      break;
    }
  while (l < r) {
    ++l;
    int x = Q[l] / m, y = Q[l] % m;
    for (int k = 0; k < 4; k++) {
      int sx = x + dx[k], sy = y + dy[k];
      if (sx < 0 || sy < 0 || sx >= n || sy >= m || ins[sx * m + sy] ||
          !w[sx * m + sy])
        continue;
      Q[++r] = sx * m + sy;
      ins[sx * m + sy] = 1;
    }
  }
  for (int i = 0; i < n * m; i++)
    if (w[i] && !ins[i]) return 0;
  return 1;
}
inline int check(int mid) {
  for (int i = 0; i < n * m; i++) w[i] = (i <= mid);
  return count();
}
inline int Solve() {
  int C = 4 * (n - 1) * (m - 1);
  if (K > C) return 0;
  if (n == 3 || m == 3) {
    if (K == C - 1 || K == C - 2 || K == C - 4 || K == C - 5) return 0;
  } else {
    if (K == C - 1 || K == C - 2 || K == C - 4 || K == C - 5 || K == C - 8)
      return 0;
  }
  int L = -1, R = n * m, MID;
  while (L + 1 < R)
    if (check(MID = (L + R) >> 1) >= K)
      R = MID;
    else
      L = MID;
  int cur = check(R);
  if (cur == K) return 1;
  vector<int> bl, em;
  for (int i = 0; i < n * m; i++)
    if (min(i / m, abs(i / m - R / m)) <= 1)
      w[i] ? bl.push_back(i) : em.push_back(i);
  int x, p;
  while (cur != K) {
    if (cur < K) {
      x = em[p = rand() % ((int)em.size())];
      w[x] = 1;
      if (!Jud()) {
        w[x] = 0;
        continue;
      }
      em.erase(em.begin() + p);
      bl.push_back(x);
      cur = count();
    } else {
      x = bl[p = rand() % ((int)bl.size())];
      w[x] = 0;
      if (!Jud()) {
        w[x] = 1;
        continue;
      }
      bl.erase(bl.begin() + p);
      em.push_back(x);
      cur = count();
    }
  }
  return 1;
}
int main() {
  int T;
  scanf("%d", &(T));
  while (T--) {
    scanf("%d", &(n));
    scanf("%d", &(m));
    scanf("%d", &(K));
    int flag = 0;
    if (n < m) swap(n, m), flag = 1;
    if (Solve()) {
      if (!flag) {
        for (int i = 0; i < n; i++, putchar('\n'))
          for (int j = 0; j < m; j++) putchar(w[i * m + j] ? '*' : '.');
      } else {
        for (int j = 0; j < m; j++, putchar('\n'))
          for (int i = 0; i < n; i++) putchar(w[i * m + j] ? '*' : '.');
      }
      putchar('\n');
    } else
      printf("-1\n\n");
  }
  return 0;
}