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;
template <class T>
inline void read(T &x) {
  int f = 0;
  x = 0;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar()) f |= (ch == '-');
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  if (f) x = -x;
}
const int N = 100005;
int xx[N], yy[N], yes[N], n, m, cnt, now, flag, x, y, X, Y, K, L = 11;
vector<int> a[N];
int calc(int x, int y) {
  int res = 0;
  res += a[x - 1][y - 1] & a[x - 1][y];
  res += a[x - 1][y - 1] & a[x][y - 1];
  res += a[x - 1][y] & a[x][y - 1];
  res += a[x - 1][y] & a[x - 1][y + 1];
  return res;
}
int chk(int s) {
  static int q[N];
  int l = 0, r = 0;
  for (int i = (1); i <= (cnt); i++) {
    a[xx[i]][yy[i]] = 0;
    yes[i] = 0;
    if (!(s >> (i - 1) & 1)) continue;
    if (xx[i] == x || xx[i] == x + 1 && yy[i] <= y) yes[i] = 1, q[r++] = i;
  }
  while (l < r) {
    int u = q[l++];
    for (int v = (1); v <= (cnt); v++)
      if (s >> (v - 1) & 1) {
        if (!yes[v] && abs(xx[u] - xx[v]) + abs(yy[u] - yy[v]) == 1) {
          yes[v] = 1, q[r++] = v;
        }
      }
  }
  for (int i = (1); i <= (cnt); i++)
    if ((s >> (i - 1) & 1) && !yes[i]) return 0;
  int sum = now;
  for (int i = (1); i <= (cnt); i++)
    if (s >> (i - 1) & 1) sum += calc(xx[i], yy[i]), a[xx[i]][yy[i]] = 1;
  return sum == K;
}
void rmain() {
  read(n), read(m), read(K);
  if (n < m)
    swap(n, m), flag = 1;
  else
    flag = 0;
  for (int i = (0); i <= (n + 1); i++) a[i].clear(), a[i].resize(m + 2);
  now = 0, x = n, y = m;
  int rem = n * m;
  for (int i = (1); i <= (n); i++) {
    int owo = 0;
    for (int j = (1); j <= (m); j++) {
      int nxt = calc(i, j);
      rem--;
      if (now + nxt <= K && rem >= L)
        now += nxt, a[i][j] = 1;
      else {
        x = i, y = j - 1;
        if (y == 0) y = m, x--;
        owo = 1;
        break;
      }
    }
    if (owo) break;
  }
  cnt = 0, X = x, Y = y;
  int Flag = (x < n);
  while (cnt + flag < L) {
    Y++;
    if (Y > m) X++, Y = 1;
    if (X > n) break;
    xx[++cnt] = X, yy[cnt] = Y;
    if (X == x + 1 && Y == y) Flag = 0;
  }
  if (Flag) xx[++cnt] = x + 1, yy[cnt] = y;
  int found = 0;
  for (int s = (x == 0 ? 1 : 0); s < (1 << cnt); s++)
    if (chk(s)) {
      found = 1;
      break;
    }
  if (!found) {
    puts("-1");
    return;
  }
  if (flag) swap(n, m);
  for (int i = (1); i <= (n); i++) {
    for (int j = (1); j <= (m); j++)
      printf("%c", (flag ? a[j][i] : a[i][j]) ? '*' : '.');
    puts("");
  }
}
int main() {
  int T;
  read(T);
  while (T--) rmain(), puts("");
  return 0;
}