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 long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
const int N = 101000;
int val[N];
int _, n, m, k;
int count() {
  int cnt = 0;
  for (int i = 0; i < n - 1; i++)
    for (int j = 0; j < m - 1; j++) {
      int id = i * m + j;
      cnt += val[id] & val[id + m] & val[id + 1];
      cnt += val[id + m + 1] & val[id + m] & val[id + 1];
      cnt += val[id] & val[id + m] & val[id + m + 1];
      cnt += val[id] & val[id + 1] & val[id + m + 1];
    }
  return cnt;
}
int check(int md) {
  for (int i = 0; i < n * m; i++) val[i] = i < md;
  return count();
}
int q[N], vis[N];
bool connected() {
  int t = 0;
  for (int i = 0; i < n * m; i++)
    if (val[i]) {
      q[t++] = i;
      break;
    }
  for (int i = 0; i < n * m; i++) vis[i] = 0;
  vis[q[0]] = 1;
  for (int i = 0; i < t; i++) {
    int u = q[i];
    if (u % m > 0 && val[u - 1] && !vis[u - 1]) {
      q[t++] = u - 1;
      vis[u - 1] = 1;
    }
    if (u % m < m - 1 && val[u + 1] && !vis[u + 1]) {
      q[t++] = u + 1;
      vis[u + 1] = 1;
    }
    if (u / m > 0 && val[u - m] && !vis[u - m]) {
      q[t++] = u - m;
      vis[u - m] = 1;
    }
    if (u / m < n - 1 && val[u + m] && !vis[u + m]) {
      q[t++] = u + m;
      vis[u + m] = 1;
    }
  }
  for (int i = 0; i < n * m; i++)
    if (vis[i] != val[i]) return 0;
  return 1;
}
bool gao(int n, int m, int t) {
  if (t > 4 * (n - 1) * (m - 1)) return 0;
  if (n == 3 || m == 3) {
    int rem = 4 * (n - 1) * (m - 1) - t;
    if (rem == 1 || rem == 2 || rem == 4 || rem == 5) return 0;
  } else {
    int rem = 4 * (n - 1) * (m - 1) - t;
    if (rem == 1 || rem == 2 || rem == 4 || rem == 5 || rem == 8) return 0;
  }
  int l = 0, r = n * m + 1;
  while (l + 1 < r) {
    int md = (l + r) >> 1;
    if (check(md) >= t)
      r = md;
    else
      l = md;
  }
  int c = check(r);
  if (c == t) {
    return 1;
  }
  vector<int> bl, em;
  for (int i = 0; i < n * m; i++)
    if (i / m <= 1 || abs(i / m - r / m) <= 1) {
      if (val[i])
        bl.push_back(i);
      else
        em.push_back(i);
    }
  while (c != t) {
    if (c < t) {
      assert(!em.empty());
      int p = rand() % ((int)(em).size());
      int v = em[p];
      val[v] = 1;
      if (!connected()) {
        val[v] = 0;
        continue;
      }
      em.erase(em.begin() + p);
      bl.push_back(v);
      val[v] = 1;
      c = count();
    } else {
      assert(!bl.empty());
      int p = rand() % ((int)(bl).size());
      int v = bl[p];
      val[v] = 0;
      if (!connected()) {
        val[v] = 1;
        continue;
      }
      bl.erase(bl.begin() + p);
      em.push_back(v);
      val[v] = 0;
      c = count();
    }
  }
  assert(t == count());
  assert(connected());
  return 1;
}
int main() {
  for (scanf("%d", &_); _; _--) {
    scanf("%d%d%d", &n, &m, &k);
    bool fg;
    if (n < m)
      swap(n, m), fg = 1;
    else
      fg = 0;
    if (!gao(n, m, k)) {
      puts("-1");
      puts("");
    } else {
      if (!fg) {
        for (int i = 0; i < n; i++) {
          for (int j = 0; j < m; j++)
            if (val[i * m + j])
              putchar('*');
            else
              putchar('.');
          puts("");
        }
      } else {
        for (int j = 0; j < m; j++) {
          for (int i = 0; i < n; i++)
            if (val[i * m + j])
              putchar('*');
            else
              putchar('.');
          puts("");
        }
      }
      puts("");
    }
  }
}