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 = 100010;
int c[N], n, m, tg;
int calc() {
  int res = 0;
  for (int i = 0; i < n - 1; ++i) {
    for (int j = 0; j < m - 1; ++j) {
      int x = i * m + j;
      res +=
          (c[x] & c[x + m] & c[x + 1]) + (c[x + m + 1] & c[x + m] & c[x + 1]) +
          (c[x] & c[x + m] & c[x + m + 1]) + (c[x] & c[x + 1] & c[x + m + 1]);
    }
  }
  return res;
}
const int dx[4] = {0, 0, 1, -1};
const int dy[4] = {1, -1, 0, 0};
queue<int> q;
bool vis[N];
int judge() {
  while (!q.empty()) q.pop();
  for (int i = 0; i < n * m; ++i) vis[i] = 0;
  for (int i = 0; i < n * m; ++i) {
    if (c[i]) {
      q.push(i);
      break;
    }
  }
  while (!q.empty()) {
    int x = q.front() / m, y = q.front() % m;
    q.pop();
    for (int i = 0; i < 4; ++i) {
      int xx = x + dx[i], yy = y + dy[i];
      if (xx < 0 || yy < 0 || xx >= n || yy >= m || vis[xx * m + yy] ||
          !c[xx * m + yy])
        continue;
      q.push(xx * m + yy);
      vis[xx * m + yy] = 1;
    }
  }
  for (int i = 0; i < n * m; ++i)
    if (c[i] && !vis[i]) return 0;
  return 1;
}
int check(int mid) {
  for (int i = 0; i < n * m; ++i) c[i] = (i <= mid);
  return calc();
}
int solve() {
  int lim = 4 * (n - 1) * (m - 1);
  if (tg > lim) return 0;
  if (n == 3 || m == 3) {
    if (tg == lim - 1 || tg == lim - 2 || tg == lim - 4 || tg == lim - 5)
      return 0;
  } else {
    if (tg == lim - 1 || tg == lim - 2 || tg == lim - 4 || tg == lim - 5 ||
        tg == lim - 8)
      return 0;
  }
  int l = -1, r = n * m;
  while (l + 1 < r) {
    int mid = (l + r) >> 1;
    if (check(mid) >= tg)
      r = mid;
    else
      l = mid;
  }
  int now = check(r);
  if (now == tg) return 1;
  vector<int> v1, v2;
  for (int i = 0; i < n * m; ++i) {
    if (min(i / m, abs(i / m - r / m)) <= 1) {
      if (c[i])
        v1.push_back(i);
      else
        v2.push_back(i);
    }
  }
  while (now != tg) {
    if (now < tg) {
      int r = rand() % ((int)v2.size());
      int x = v2[r];
      c[x] = 1;
      if (!judge()) {
        c[x] = 0;
        continue;
      }
      v2.erase(v2.begin() + r);
      v1.push_back(x);
      now = calc();
    } else {
      int r = rand() % ((int)v1.size());
      int x = v1[r];
      c[x] = 0;
      if (!judge()) {
        c[x] = 1;
        continue;
      }
      v1.erase(v1.begin() + r);
      v2.push_back(x);
      now = calc();
    }
  }
  return 1;
}
int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -f;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - 48;
    c = getchar();
  }
  return x * f;
}
signed main() {
  int T = read();
  while (T-- > 0) {
    n = read();
    m = read();
    tg = read();
    bool flag = 0;
    if (n < m) {
      flag = 1;
      swap(n, m);
    }
    if (solve()) {
      if (!flag) {
        for (int i = 0; i < n; ++i) {
          for (int j = 0; j < m; ++j) putchar(c[i * m + j] ? '*' : '.');
          putchar('\n');
        }
      } else {
        for (int j = 0; j < m; ++j) {
          for (int i = 0; i < n; ++i) putchar(c[i * m + j] ? '*' : '.');
          putchar('\n');
        }
      }
      putchar('\n');
    } else
      puts("-1\n");
  }
  return 0;
}