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 = 1e5 + 9;
int vis[N], val[N], flag;
char s[2] = {'.', '*'};
int n, m, k;
int id(int i, int j) { return i * m + j; }
bool connect() {
  for (int i = (0); i < (n * m); ++i) vis[i] = 0;
  vector<int> q;
  for (int i = (0); i < (n * m); ++i) {
    if (val[i]) {
      q.push_back(i);
      vis[i] = 1;
      break;
    }
  }
  for (int _ = (0); _ < (q.size()); ++_) {
    int u = q[_];
    int i = u / m, j = u % m;
    if (i && !vis[id(i - 1, j)] && val[id(i - 1, j)]) {
      vis[id(i - 1, j)] = 1;
      q.push_back(id(i - 1, j));
    }
    if (i < n - 1 && !vis[id(i + 1, j)] && val[id(i + 1, j)]) {
      vis[id(i + 1, j)] = 1;
      q.push_back(id(i + 1, j));
    }
    if (j && !vis[id(i, j - 1)] && val[id(i, j - 1)]) {
      vis[id(i, j - 1)] = 1;
      q.push_back(id(i, j - 1));
    }
    if (j < m - 1 && !vis[id(i, j + 1)] && val[id(i, j + 1)]) {
      vis[id(i, j + 1)] = 1;
      q.push_back(id(i, j + 1));
    }
  }
  for (int i = (0); i < (n * m); ++i)
    if (vis[i] ^ val[i]) {
      return 0;
    }
  return 1;
}
int count() {
  int res = 0;
  for (int i = (1); i < (n); ++i)
    for (int j = (1); j < (m); ++j) {
      int p = id(i, j);
      res += val[p] & val[p - 1] & val[p - m];
      res += val[p] & val[p - 1] & val[p - 1 - m];
      res += val[p] & val[p - m] & val[p - 1 - m];
      res += val[p - 1] & val[p - m] & val[p - 1 - m];
    }
  return res;
}
bool solve() {
  flag = n < m;
  if (n < m) swap(n, m);
  int sum = 4 * (n - 1) * (m - 1) - k;
  if (sum < 0) return 0;
  if (n == 3 || m == 3) {
    if (sum == 1 || sum == 2 || sum == 4 || sum == 5) return 0;
  } else {
    if (sum == 1 || sum == 2 || sum == 4 || sum == 5 || sum == 8) return 0;
  }
  int l = 1, r = n * m + 1;
  while (l < r) {
    int mid = l + r >> 1;
    for (int i = (0); i < (mid); ++i) val[i] = 1;
    for (int i = (mid); i < (n * m); ++i) val[i] = 0;
    if (count() <= k)
      l = mid + 1;
    else
      r = mid;
  }
  --l;
  for (int i = (0); i < (l); ++i) val[i] = 1;
  for (int i = (l); i < (n * m); ++i) val[i] = 0;
  int cur = count();
  if (cur == k) return 1;
  vector<int> vec, vec2;
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (m); ++j) {
      if (!i || abs(i - l / m) <= 1) {
        if (val[id(i, j)])
          vec.push_back(id(i, j));
        else
          vec2.push_back(id(i, j));
      }
    }
  }
  while (cur ^ k) {
    if (cur < k) {
      int _ = rand() % vec2.size();
      int x = vec2[_];
      val[x] = 1;
      if (!connect()) {
        val[x] = 0;
        continue;
      }
      vec2.erase(vec2.begin() + _);
      vec.push_back(x);
    } else {
      int _ = rand() % vec.size();
      int x = vec[_];
      val[x] = 0;
      if (!connect()) {
        val[x] = 1;
        continue;
      }
      vec.erase(vec.begin() + _);
      vec2.push_back(x);
    }
    cur = count();
  }
  return 1;
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d%d", &n, &m, &k);
    if (solve()) {
      if (flag) {
        for (int j = (0); j < (m); ++j) {
          for (int i = (0); i < (n); ++i) putchar(s[val[id(i, j)]]);
          puts("");
        }
      } else {
        for (int i = (0); i < (n); ++i) {
          for (int j = (0); j < (m); ++j) putchar(s[val[id(i, j)]]);
          puts("");
        }
      }
    } else
      puts("-1");
  }
}