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>
const int N = 100000 + 10;
int g[330][N];
int n, m, k;
int main() {
  int T;
  scanf("%d", &T);
  for (int cas = 1; cas <= T; ++cas) {
    scanf("%d%d%d", &n, &m, &k);
    bool flip = false;
    if (n > m) std::swap(n, m), flip = true;
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) {
        g[i][j] = 0;
      }
    }
    if (n <= 4 && m <= 4) {
      bool find = false;
      for (int mask = 1; mask < (1 << (n * m)) && !find; ++mask) {
        for (int i = 0; i < n; ++i) {
          for (int j = 0; j < m; ++j) {
            g[i][j] = mask >> (i * m + j) & 1;
          }
        }
        int cnt = 0;
        for (int i = 0; i < n - 1; ++i) {
          for (int j = 0; j < m - 1; ++j) {
            int t = g[i][j] + g[i + 1][j] + g[i][j + 1] + g[i + 1][j + 1];
            if (t == 3)
              ++cnt;
            else if (t == 4)
              cnt += 4;
          }
        }
        if (cnt == k) find = true;
      }
      if (!find) {
        puts("-1\n");
        continue;
      }
    } else if (k > (n - 1) * (m - 1) * 4) {
      puts("-1\n");
      continue;
    } else if (k == (n - 1) * (m - 1) * 4) {
      for (int i = 0; i < n; ++i) {
        for (int j = 0; j < m; ++j) {
          g[i][j] = 1;
        }
      }
    } else if (k == (n - 1) * (m - 1) * 4 - 8) {
      if (n != 3) {
        puts("-1\n");
        continue;
      }
      for (int i = 0; i < n; ++i) {
        for (int j = 0; j < m; ++j) {
          g[i][j] = j > 0;
        }
      }
    } else if (!k) {
      g[0][0] = 1;
    } else {
      --k;
      for (int i = 0; i < m; ++i) g[0][i] = 1;
      int x = 0, y = m - 1;
      for (int i = 1; i < n && k >= 4; ++i) {
        for (int j = 1; j < m && k >= 4; ++j) {
          x = i, y = j;
          g[i][j] = 1;
          k -= 4;
        }
      }
      if (y == m - 1) ++x, y = 0;
      for (int i = 0; i <= x; ++i) g[i][0] = 1;
      if (k == 1) {
        if (x != n - 1) {
          if (y >= 1)
            g[x + 1][0] = 1;
          else
            g[x][m - 1] = 1;
        } else if (y < m - 2) {
          g[n - 1][m - 1] = 1;
        } else {
          puts("-1\n");
          continue;
        }
      } else if (k == 2) {
        if (x != n - 1) {
          if (y >= 2)
            g[x + 1][1] = 1;
          else
            g[x][m - 2] = 1;
        } else if (y < m - 3) {
          g[x][m - 2] = 1;
        } else {
          puts("-1\n");
          continue;
        }
      } else if (k == 3) {
        if (x != n - 1) {
          if (y >= 3)
            g[x + 1][0] = g[x + 1][y - 1] = 1;
          else if (y == 2)
            g[x + 1][1] = g[x][m - 1] = 1;
          else if (y == 1)
            g[x + 1][0] = g[x][m - 2] = 1;
          else
            g[x][m - 3] = g[x][m - 1] = 1;
        } else if (y < m - 4) {
          g[x][m - 3] = g[x][m - 1] = 1;
        } else {
          puts("-1\n");
          continue;
        }
      }
    }
    if (flip) {
      for (int j = 0; j < m; ++j) {
        for (int i = 0; i < n; ++i) {
          putchar(g[i][j] ? '*' : '.');
        }
        puts("");
      }
    } else {
      for (int i = 0; i < n; ++i) {
        for (int j = 0; j < m; ++j) {
          putchar(g[i][j] ? '*' : '.');
        }
        puts("");
      }
    }
    puts("");
  }
  return 0;
}