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 = 100100;
int n, m, k;
bool rev;
vector<int> a[N];
const int BOUND = 11;
void clear() {
  for (int i = 0; i < n; i++) {
    a[i].clear();
    a[i].resize(m);
    for (int j = 0; j < m; j++) a[i][j] = 0;
  }
}
int calcSquare(int x, int y) {
  if (x < 0 || y < 0 || x + 1 >= n || y + 1 >= m) return 0;
  return a[x][y] + a[x + 1][y] + a[x][y + 1] + a[x + 1][y + 1];
}
int evalScore(int x) {
  if (x == 4) return 3;
  if (x == 3) return 1;
  return 0;
}
void printAns() {
  if (!rev) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++)
        if (a[i][j] == 1)
          printf("*");
        else
          printf(".");
      printf("\n");
    }
  } else {
    for (int i = 0; i < m; i++) {
      for (int j = 0; j < n; j++)
        if (a[j][i] == 1)
          printf("*");
        else
          printf(".");
      printf("\n");
    }
  }
  return;
}
void solveStupid() {
  clear();
  int x = 0;
  for (int i = 0; x < k && i < n; i++)
    for (int j = 0; x < k && j < m; j++) {
      int oldX = x;
      a[i][j] = 1;
      x += evalScore(calcSquare(i - 1, j - 1));
      x += evalScore(calcSquare(i - 1, j));
      if (x > k) {
        a[i][j] = 0;
        x = oldX;
      }
    }
  if (x != k) throw;
  printAns();
  return;
}
int off(int x, int y) {
  if (a[x][y] == 0) throw;
  int res = 0;
  res += evalScore(calcSquare(x - 1, y - 1));
  res += evalScore(calcSquare(x - 1, y));
  res += evalScore(calcSquare(x, y - 1));
  res += evalScore(calcSquare(x, y));
  a[x][y] = 0;
  return res;
}
void solveBrute() {
  clear();
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) a[i][j] = 1;
  k = 4 * (n - 1) * (m - 1) - k;
  vector<pair<int, int> > pos;
  pos.push_back(make_pair(0, 0));
  pos.push_back(make_pair(1, 0));
  pos.push_back(make_pair(0, 1));
  pos.push_back(make_pair(0, 2));
  pos.push_back(make_pair(0, m - 1));
  pos.push_back(make_pair(n - 1, 0));
  pos.push_back(make_pair(n - 1, m - 1));
  if (m > 3) pos.push_back(make_pair(0, 3));
  sort(pos.begin(), pos.end());
  pos.resize(unique(pos.begin(), pos.end()) - pos.begin());
  int w = (int)pos.size();
  for (int mask = 0; mask < (1 << w); mask++) {
    if (mask > 0 && ((mask & 1) == 0)) continue;
    for (int i = 0; i < w; i++) a[pos[i].first][pos[i].second] = 1;
    int cur = k;
    for (int i = 0; i < w; i++) {
      if (((mask >> i) & 1) == 0) continue;
      cur -= off(pos[i].first, pos[i].second);
    }
    if (cur == 0) {
      printAns();
      return;
    }
  }
  printf("-1\n");
  return;
}
void solve() {
  scanf("%d%d%d", &n, &m, &k);
  if (k == 0) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (i == 0 && j == 0)
          printf("*");
        else
          printf(".");
      }
      printf("\n");
    }
    return;
  }
  rev = 0;
  if (n > m) {
    swap(n, m);
    rev = 1;
  }
  int delta = 4 * (n - 1) * (m - 1) - k;
  if (delta < 0) {
    printf("-1\n");
    return;
  }
  if (delta >= BOUND) {
    solveStupid();
    return;
  }
  solveBrute();
  return;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    solve();
    if (t != 0) printf("\n");
  }
  return 0;
}