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 = 100005;
int w[N], q[N], vis[N];
int n, m, k, fl, qq[N];
bool connect() {
  int h = 0, t = 1, cnt = 0;
  for (int i = (int)(1); i <= (int)(n * m); i++) vis[i] = 0;
  for (int i = (int)(1); i <= (int)(n * m); i++)
    if (w[i]) q[1] = i, ++cnt;
  vis[q[1]] = 1;
  while (h != t) {
    int x = q[++h];
    if (x + m <= n && w[x + m] && !vis[x + m]) vis[x + m] = 1, q[++t] = x + m;
    if (x - m >= 1 && w[x - m] && !vis[x - m]) vis[x - m] = 1, q[++t] = x - m;
    if (x % m != 0 && w[x + 1] && !vis[x + 1]) vis[x + 1] = 1, q[++t] = x + 1;
    if (x % m != 1 && w[x - 1] && !vis[x - 1]) vis[x - 1] = 1, q[++t] = x - 1;
  }
  return cnt == t;
}
int count() {
  int ans = 0;
  for (int i = (int)(1); i <= (int)((n - 1) * m); i++)
    if (i % m) {
      ans += w[i] & w[i + 1] & w[i + m];
      ans += w[i] & w[i + 1] & w[i + 1 + m];
      ans += w[i] & w[i + m] & w[i + 1 + m];
      ans += w[i + 1] & w[i + m] & w[i + 1 + m];
    }
  return ans;
}
int check(int p) {
  for (int i = (int)(1); i <= (int)(n * m); i++) w[i] = (i <= p);
  return count();
}
bool work() {
  int c = 4 * (n - 1) * (m - 1);
  if (k > c || k == c - 1 || k == c - 2 || k == c - 4 || k == c - 5) return 0;
  if (k == c - 8 && n != 3 && m != 3) return 0;
  int l = 0, r = n * m, ans = 0;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (check(mid) <= k)
      ans = mid, l = mid + 1;
    else
      r = mid - 1;
  }
  check(ans);
  int cur = count(), top = 0;
  if (cur == k) return 1;
  for (int i = (int)(1); i <= (int)(n * m); i++)
    if ((i - 1) / m == 0 || abs((i - 1) / m - (ans - 1) / m) <= 1)
      qq[++top] = i;
  for (; cur ^ k;) {
    int at, x;
    if (cur < k) {
      for (;;) {
        at = rand() % top + 1;
        if (!w[qq[at]]) break;
      }
      x = qq[at];
      w[x] = 1;
      if (!connect()) {
        w[x] = 0;
        continue;
      }
      cur = count();
    } else {
      for (;;) {
        at = rand() % top + 1;
        if (w[qq[at]]) break;
      }
      x = qq[at];
      w[x] = 0;
      if (!connect()) {
        w[x] = 1;
        continue;
      }
      cur = count();
    }
  }
  return 1;
}
void solve() {
  scanf("%d%d%d", &n, &m, &k);
  int fl = (n < m);
  if (fl) swap(n, m);
  if (!work())
    puts("-1");
  else if (!fl) {
    for (int i = (int)(1); i <= (int)(n); i++) {
      for (int j = (int)(1); j <= (int)(m); j++)
        putchar(w[(i - 1) * m + j] ? '*' : '.');
      puts("");
    }
  } else {
    for (int i = (int)(1); i <= (int)(m); i++) {
      for (int j = (int)(1); j <= (int)(n); j++)
        putchar(w[(j - 1) * m + i] ? '*' : '.');
      puts("");
    }
  }
  puts("");
}
int main() {
  srand(19 * 6 * 817);
  int T;
  scanf("%d", &T);
  while (T--) solve();
}