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;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXN = 100000;
int h, w, n, want;
bool haveret;
char ret[MAXN + 1], nret[MAXN + 1];
void bf() {
  for (int msk = (1); msk < (1 << n); ++msk) {
    int cur = 0;
    for (int x = (0); x < (h - 1); ++x)
      for (int y = (0); y < (w - 1); ++y) {
        int cnt = 0;
        for (int dx = (0); dx < (2); ++dx)
          for (int dy = (0); dy < (2); ++dy)
            if ((msk >> ((x + dx) * w + (y + dy))) & 1) ++cnt;
        if (cnt == 3) ++cur;
        if (cnt == 4) cur += 4;
      }
    if (cur == want) {
      haveret = true;
      for (int j = (0); j < (n); ++j) ret[j] = (msk >> j) & 1 ? '*' : '.';
      return;
    }
  }
}
void greedy() {
  if (h == 2 && want == (w - 2) * 4) {
    haveret = true;
    for (int x = (0); x < (h); ++x)
      for (int y = (0); y < (w); ++y)
        ret[x * w + y] = 0 <= y && y < w - 1 ? '*' : '.';
    return;
  }
  if (h == 2 && want == (w - 3) * 4) {
    haveret = true;
    for (int x = (0); x < (h); ++x)
      for (int y = (0); y < (w); ++y)
        ret[x * w + y] = 1 <= y && y < w - 1 ? '*' : '.';
    return;
  }
  if (h == 3 && want == (w - 2) * 8) {
    haveret = true;
    for (int x = (0); x < (h); ++x)
      for (int y = (0); y < (w); ++y)
        ret[x * w + y] = 0 <= y && y < w - 1 ? '*' : '.';
    return;
  }
  int left = want;
  for (int x = (0); x < (h); ++x)
    for (int y = (0); y < (w); ++y) ret[x * w + y] = x == 0 ? '*' : '.';
  int x, y;
  for (x = 1; x < h; ++x) {
    for (y = 0; y < w; ++y) {
      if (left <= 3 || x == h - 1 && w - y == 4) break;
      ret[x * w + y] = '*';
      left -= y == 0 ? 1 : y == w - 1 ? 3 : 4;
    }
    if (left <= 3 || x == h - 1 && w - y == 4) break;
  }
  if (x == h - 1 && w - y == 4) {
    for (int msk = (0); msk < (1 << 4); ++msk) {
      int cur = 0;
      for (int yy = (0); yy < (4); ++yy) {
        int cnt = 0;
        for (int dy = (0); dy < (2); ++dy)
          if (yy + dy == 0 || (msk >> (yy + dy - 1) & 1)) ++cnt;
        if (cnt == 1) ++cur;
        if (cnt == 2) cur += 4;
      }
      if (cur - 1 == left) {
        haveret = true;
        for (int j = (0); j < (4); ++j)
          ret[x * w + y + j] = (msk >> j) & 1 ? '*' : '.';
        return;
      }
    }
  }
  if (left <= 3) {
    int dy = w - y;
    int y1 = dy == 2 || dy >= 4 ? w - 1 : 0;
    int y2 = dy == 3 ? w - 2 : dy >= 4 ? w - 3 : dy == 2 ? 1 : 2;
    if (left & 1) ret[(x + (y1 < y ? 1 : 0)) * w + y1] = '*';
    if (left & 2) ret[(x + (y2 < y ? 1 : 0)) * w + y2] = '*';
    haveret = true;
  }
}
void run() {
  scanf("%d%d%d", &h, &w, &want);
  n = h * w;
  haveret = false;
  if (h <= 4 && w <= 4) {
    bf();
  } else {
    bool swp = w < h;
    if (swp) swap(w, h);
    greedy();
    if (swp) {
      swap(w, h);
      for (int x = (0); x < (h); ++x)
        for (int y = (0); y < (w); ++y) nret[x * w + y] = ret[y * h + x];
      for (int i = (0); i < (n); ++i) ret[i] = nret[i];
    }
  }
  if (!haveret)
    printf("-1\n");
  else
    for (int x = (0); x < (h); ++x) {
      for (int y = (0); y < (w); ++y) printf("%c", ret[x * w + y]);
      puts("");
    }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = (1); i <= (n); ++i) {
    if (i != 1) puts("");
    run();
  }
  return 0;
}