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 rdtsc() {
  long long tmp;
  asm("rdtsc" : "=A"(tmp));
  return tmp;
}
inline int myrand() { return rand(); }
inline int rnd(int x) { return myrand() % x; }
const int inf = (int)1.01e9;
const long double eps = 1e-9;
const long double pi = acos((long double)-1.0);
const int K = 5;
int prec[K][K][K * K * 4];
void precalc() { memset(prec, -1, sizeof(prec)); }
int n, m, k;
int read() {
  if (scanf("%d%d%d", &n, &m, &k) < 3) {
    return 0;
  }
  return 1;
}
const int maxn = (int)1e5 + 10;
vector<string> a;
const int gox[] = {1, 0, -1, 0}, goy[] = {0, 1, 0, -1};
vector<vector<bool> > used;
bool ok(int x, int y) { return 0 <= x && x < n && 0 <= y && y < m; }
int dfs(int x, int y) {
  used[x][y] = 1;
  int res = 1;
  for (int dir = 0; dir < 4; ++dir) {
    int nx = x + gox[dir], ny = y + goy[dir];
    if (ok(nx, ny) && a[nx][ny] == '*' && !used[nx][ny]) {
      res += dfs(nx, ny);
    }
  }
  return res;
}
int getFunc() {
  assert(((int)(a).size()) == n);
  for (int i = 0; i < n; ++i) {
    assert(((int)(a[i]).size()) == m);
    for (int j = 0; j < m; ++j) {
      if (a[i][j] == '*') {
        used = vector<vector<bool> >(n, vector<bool>(m, 0));
        int cnt = dfs(i, j);
        int want = 0;
        for (int r = 0; r < n; ++r) {
          want += count(a[r].begin(), a[r].end(), '*');
        }
        if (want != cnt) {
          return -1;
        }
        int res = 0;
        for (int i = 0; i < n - 1; ++i) {
          for (int j = 0; j < m - 1; ++j) {
            int cnt = (a[i][j] == '*') + (a[i + 1][j] == '*') +
                      (a[i][j + 1] == '*') + (a[i + 1][j + 1] == '*');
            if (cnt == 3) {
              ++res;
            }
            if (cnt == 4) {
              res += 4;
            }
          }
        }
        return res;
      }
    }
  }
  return -1;
}
bool getAns() {
  int mx = (n - 1) * (m - 1) * 4;
  if (k > mx) {
    return 0;
  }
  if (n < K && m < K) {
    int cnt = n * m;
    a.resize(n);
    if (prec[n][m][k] == 0) {
      return 0;
    }
    int left = 0, right = (1 << cnt);
    if (prec[n][m][k] != -1) {
      left = prec[n][m][k], right = left + 1;
    }
    for (int mask = left; mask < right; ++mask) {
      for (int i = 0; i < n; ++i) {
        a[i].resize(m);
        for (int j = 0; j < m; ++j) {
          a[i][j] = ((mask >> (i * m + j)) & 1) ? '*' : '.';
        }
      }
      int got = getFunc();
      if (got != -1) {
        prec[n][m][got] = mask;
      }
      if (got == k) {
        return 1;
      }
    }
    for (int t = 0; t <= mx; ++t) {
      if (prec[n][m][t] == -1) {
        prec[n][m][t] = 0;
      }
    }
    return 0;
  }
  if (k == mx - 1 || k == mx - 2 || k == mx - 4 || k == mx - 5) {
    return 0;
  }
  bool torev = 0;
  if (n > m) {
    torev = 1;
    swap(n, m);
  }
  if (k == mx - 8) {
    if (n != 3) {
      if (torev) {
        swap(n, m);
      }
      return 0;
    }
  }
  a.resize(n);
  if (k == mx - 8) {
    for (int i = 0; i < n; ++i) {
      a[i] = string(m - 1, '*') + ".";
    }
  } else {
    for (int i = 0; i < n; ++i) {
      a[i] = string(m, !i ? '*' : '.');
    }
    int left = k;
    for (int i = 1; i < n && left > 0; ++i) {
      if (left < 5) {
        if (left >= 2) {
          a[i][2] = '*';
          left -= 2;
        }
        if (left >= 1) {
          a[i][0] = '*';
          left -= 1;
        }
        if (left >= 1) {
          a[i][m - 1] = '*';
          left -= 1;
        }
        break;
      }
      a[i][0] = a[i][1] = '*';
      left -= 5;
      for (int j = 2; j < m && left > 0; ++j) {
        int cur = (j == m - 1 ? 3 : 4);
        if (left < cur) {
          if (cur == 4) {
            if (left == 1) {
              a[i].back() = '*';
              --left;
              break;
            }
            if (left == 2) {
              if (j < m - 2) {
                a[i][j + 1] = '*';
              } else {
                assert(i + 1 < n);
                a[i + 1][1] = '*';
              }
              left -= 2;
              break;
            }
            if (left == 3) {
              if (j < m - 3) {
                a[i][j + 1] = a[i][m - 1] = '*';
              } else {
                if (j == m - 3) {
                  assert(i + 1 < n);
                  a[i][m - 2] = a[i + 1][0] = '*';
                } else {
                  assert(j == m - 2);
                  assert(i + 1 < n);
                  a[i][m - 1] = a[i + 1][1] = '*';
                }
              }
              left -= 3;
              break;
            }
          } else {
            assert(i + 1 < n);
            a[i + 1][left - 1] = '*';
            left = 0;
            break;
          }
          assert(0);
        }
        left -= cur;
        a[i][j] = '*';
      }
    }
    assert(!left);
  }
  if (torev) {
    swap(n, m);
    vector<string> b(n);
    swap(a, b);
    assert(((int)(a).size()) == n && ((int)(b).size()) == m);
    for (int i = 0; i < n; ++i) {
      a[i].resize(m);
      for (int j = 0; j < m; ++j) {
        a[i][j] = b[j][i];
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    assert(((int)(a[i]).size()) == m);
    for (int j = 0; j < m; ++j) {
      assert(a[i][j] == '*' || a[i][j] == '.');
    }
  }
  assert(getFunc() == k);
  return 1;
}
void solve() {
  if (!getAns()) {
    printf("-1\n");
    return;
  }
  for (int i = 0; i < n; ++i) {
    printf("%s\n", a[i].c_str());
  }
}
int main() {
  srand(rdtsc());
  precalc();
  int t;
  scanf("%d", &t);
  bool first = 1;
  while (1) {
    if (!read()) {
      break;
    }
    if (!first) {
      printf("\n");
    }
    first = 0;
    solve();
  }
  return 0;
}