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;
inline long long rd() {
  long long x = 0;
  int ch = getchar(), f = 1;
  while (!isdigit(ch) && (ch != '-') && (ch != EOF)) ch = getchar();
  if (ch == '-') {
    f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline void rt(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10)
    rt(x / 10), putchar(x % 10 + '0');
  else
    putchar(x + '0');
}
const int maxn = 100005;
bool dsc;
char s[maxn], vis[20];
int n, m, k;
inline int id(int x, int y) { return (x - 1) * m + y; }
void dfs(int x, int y, int n, int m) {
  vis[id(x, y)] = 1;
  if (x > 1 && s[id(x - 1, y)] == '*' && !vis[id(x - 1, y)])
    dfs(x - 1, y, n, m);
  if (y > 1 && s[id(x, y - 1)] == '*' && !vis[id(x, y - 1)])
    dfs(x, y - 1, n, m);
  if (x < n && s[id(x + 1, y)] == '*' && !vis[id(x + 1, y)])
    dfs(x + 1, y, n, m);
  if (y < m && s[id(x, y + 1)] == '*' && !vis[id(x, y + 1)])
    dfs(x, y + 1, n, m);
}
void dfs(int x, int y, int n, int m, int k) {
  if (x == n + 1) {
    if (k) return;
    for (int i = 1; i <= (int)n * m; i++) vis[i] = 0;
    for (int i = 1; i <= (int)n; i++)
      for (int j = 1; j <= (int)m; j++) {
        if (s[id(i, j)] == '*') {
          dfs(i, j, n, m);
          i = n + 1;
          break;
        }
      }
    bool f = 1;
    for (int i = 1; i <= (int)n * m; i++)
      if (s[i] == '*' && !vis[i]) {
        f = 0;
        break;
      }
    if (f) dsc = 1;
    return;
  }
  if (x == 1) {
    s[id(x, y)] = '*';
    dfs(y == m ? x + 1 : x, y == m ? 1 : y + 1, n, m, k);
    if (dsc) return;
    s[id(x, y)] = '.';
    dfs(y == m ? x + 1 : x, y == m ? 1 : y + 1, n, m, k);
    return;
  }
  int pls = 0;
  if (y > 1 && s[id(x - 1, y - 1)] == '*' && s[id(x, y - 1)] == '*') pls++;
  if (y > 1 && s[id(x - 1, y - 1)] == '*' && s[id(x - 1, y)] == '*') pls++;
  if (y > 1 && s[id(x - 1, y)] == '*' && s[id(x, y - 1)] == '*') pls++;
  if (y < m && s[id(x - 1, y)] == '*' && s[id(x - 1, y + 1)] == '*') pls++;
  if (pls <= k) {
    s[id(x, y)] = '*';
    dfs(y == m ? x + 1 : x, y == m ? 1 : y + 1, n, m, k - pls);
    if (dsc) return;
  }
  s[id(x, y)] = '.';
  dfs(y == m ? x + 1 : x, y == m ? 1 : y + 1, n, m, k);
  return;
}
int main() {
  for (int T = rd(); T--;) {
    n = rd(), m = rd(), k = rd();
    for (int i = 1; i <= (int)n; i++)
      for (int j = 1; j <= (int)m; j++) s[id(i, j)] = '.';
    if (k > (n - 1) * (m - 1) * 4) {
      printf("-1\n\n");
      continue;
    }
    if (n < 5 && m < 5) {
      dsc = 0;
      dfs(1, 1, n, m, k);
      if (dsc) {
        for (int i = 1; i <= (int)n; i++) {
          for (int j = 1; j <= (int)m; j++) putchar(s[id(i, j)]);
          putchar('\n');
        }
      } else
        puts("-1");
      puts("");
      continue;
    }
    int rev = 0;
    if (m < 5) swap(n, m), rev = 1;
    int rem = (n - 1) * m;
    if (n == 3 && k == 8 * (m - 2)) {
      for (int i = 1; i <= (int)n; i++)
        for (int j = 2; j <= (int)m; j++) s[id(i, j)] = '*';
    } else {
      for (int j = 1; j <= (int)m; j++) s[id(1, j)] = '*';
      for (int i = 2; i <= n && rem > 4 && k > 3; i++)
        for (int j = 1; j <= m && rem > 4 && k > 3; j++) {
          s[id(i, j)] = '*';
          if (j == 1)
            k--;
          else if (j == m)
            k -= 3;
          else
            k -= 4;
          rem--;
        }
      int x = n - rem / m, y = m - rem % m;
      if (x < n) {
        if (k == 1) {
          if (y >= 2)
            s[id(x + 1, 1)] = '*';
          else
            s[id(x, m)] = '*';
        } else if (k == 2) {
          if (y >= 3)
            s[id(x + 1, 1)] = s[id(x + 1, y)] = '*';
          else if (y == 2)
            s[id(x + 1, 1)] = s[id(x, m)] = '*';
          else
            s[id(x, m)] = s[id(x + 1, 1)] = s[id(x + 1, 2)] = '*';
        } else if (k == 3) {
          if (y >= 4)
            s[id(x + 1, 1)] = s[id(x + 1, 3)] = '*';
          else if (y >= 2)
            s[id(x + 1, 1)] = s[id(x, m)] = s[id(x + 1, m)] =
                s[id(x + 1, m - 1)] = '*';
          else
            s[id(x + 1, 1)] = s[id(x + 1, 2)] = s[id(x, m)] = s[id(x + 1, m)] =
                s[id(x + 1, m - 1)] = '*';
        }
      } else {
        if (k == 1)
          s[id(x, m)] = '*';
        else if (k == 2)
          s[id(x, m - 2)] = '*';
        else if (k == 3)
          s[id(x, m)] = s[id(x, m - 2)] = '*';
        else if (k == 4)
          s[id(x, y + 1)] = '*';
        else if (k == 5)
          s[id(x, y + 1)] = s[id(x, m)] = '*';
        else if (k == 6)
          s[id(x, y + 1)] = s[id(x, m - 1)] = '*';
        else if (k == 8)
          s[id(x, y + 1)] = s[id(x, y + 2)] = '*';
        else if (k == 9)
          s[id(x, y + 1)] = s[id(x, y + 2)] = s[id(x, m)] = '*';
        else if (k == 12)
          s[id(x, y + 1)] = s[id(x, y + 2)] = s[id(x, y + 3)] = '*';
        else if (k == 15)
          s[id(x, y + 1)] = s[id(x, y + 2)] = s[id(x, y + 3)] =
              s[id(x, y + 4)] = '*';
        else if (k) {
          puts("-1\n");
          continue;
        }
      }
    }
    if (rev) {
      for (int j = 1; j <= (int)m; j++) {
        for (int i = 1; i <= (int)n; i++) putchar(s[id(i, j)]);
        putchar('\n');
      }
    } else {
      for (int i = 1; i <= (int)n; i++) {
        for (int j = 1; j <= (int)m; j++) putchar(s[id(i, j)]);
        putchar('\n');
      }
    }
    puts("");
  }
}