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>
int N, M, K, TC;
void Main() {
  if (K == 4 * (N - 1) * (M - 2)) {
    for (int i = 1; i <= N; puts(""), i++)
      for (int j = 1; j <= M; j++) putchar(j == M ? '.' : '*');
    puts("");
    return;
  }
  if (K > (N - 1) * (M - 1) * 4 - 3 && K != (N - 1) * (M - 1) * 4) {
    puts("-1\n");
    return;
  }
  for (int i = 1; i <= N; i++)
    if (K == 4 * (i - 1) * (M - 1)) {
      for (int x = 1; x <= N; puts(""), x++)
        for (int y = 1; y <= M; y++) putchar(x <= i ? '*' : '.');
      puts("");
      return;
    }
  for (int i = 1; i <= N - 1; i++) {
    for (int j = 1; j <= M - 1; j++) {
      if (K == 4 * ((i - 1) * (M - 1) + j) - 3) {
        for (int x = 1; x <= N; puts(""), x++)
          for (int y = 1; y <= M; y++)
            putchar(x <= i || x == i + 1 && y <= j ? '*' : '.');
        puts("");
        return;
      }
      if (i >= 3 || i == 2 && j >= 3)
        if (K == 4 * ((i - 1) * (M - 1) + j) - 15) {
          for (int x = 1; x <= N; puts(""), x++)
            for (int y = 1; y <= M; y++)
              putchar(x <= i || x == i + 1 && y <= j
                          ? (x != 2 || y != 2 ? '*' : '.')
                          : '.');
          puts("");
          return;
        }
    }
    for (int j = 2; j <= M - 1; j++) {
      if (K == 4 * ((i - 1) * (M - 1) + j) - 6) {
        for (int x = 1; x <= N; puts(""), x++)
          for (int y = 1; y <= M; y++)
            putchar(x <= i || x == i + 1 && (y < j || y == M) ? '*' : '.');
        puts("");
        return;
      }
      if (i >= 3 || i == 2 && j >= 4)
        if (K == 4 * ((i - 1) * (M - 1) + j) - 18) {
          for (int x = 1; x <= N; puts(""), x++)
            for (int y = 1; y <= M; y++)
              putchar(x <= i || x == i + 1 && (y < j || y == M)
                          ? (x != 2 || y != 2 ? '*' : '.')
                          : '.');
          puts("");
          return;
        }
    }
  }
  for (int i = 1; i <= N - 2; i++) {
    for (int j = 2; j <= M + M - 2; j++)
      if (K == 4 * ((i - 1) * (M - 1) + j) - 6)
        if (j <= M) {
          for (int x = 1; x <= N; puts(""), x++)
            for (int y = 1; y <= M; y++)
              putchar(x >= 2 && x <= i + 1 || x == 1 && y == 1 ||
                              x == i + 2 && y < j
                          ? '*'
                          : '.');
          puts("");
          return;
        } else {
          for (int x = 1; x <= N; puts(""), x++)
            for (int y = 1; y <= M; y++)
              putchar(x >= 2 && x <= i + 1 || x == 1 && y <= j - M + 1 ||
                              x == i + 2 && y < M
                          ? '*'
                          : '.');
          puts("");
          return;
        }
    for (int j = 3; j <= M + M - 2; j++)
      if (K == 4 * ((i - 1) * (M - 1) + j) - 9)
        if (j <= M) {
          for (int x = 1; x <= N; puts(""), x++)
            for (int y = 1; y <= M; y++)
              putchar(x >= 2 && x <= i + 1 || x == 1 && y == 1 ||
                              x == i + 2 && (y <= j - 2 || y == M)
                          ? '*'
                          : '.');
          puts("");
          return;
        } else {
          for (int x = 1; x <= N; puts(""), x++)
            for (int y = 1; y <= M; y++)
              putchar(x >= 2 && x <= i + 1 || x == 1 && y <= j - M + 1 ||
                              x == i + 2 && y != 2
                          ? '*'
                          : '.');
          puts("");
          return;
        }
    for (int j = 4; j <= M + M - 2; j++)
      if (K == 4 * ((i - 1) * (M - 1) + j) - 12)
        if (j <= M + 1) {
          for (int x = 1; x <= N; puts(""), x++)
            for (int y = 1; y <= M; y++)
              putchar(x >= 2 && x <= i + 1 || x == 1 && (y == 1 || y == M) ||
                              x == i + 2 && (y <= j - 3 || y == M)
                          ? '*'
                          : '.');
          puts("");
          return;
        } else {
          for (int x = 1; x <= N; puts(""), x++)
            for (int y = 1; y <= M; y++)
              putchar(x >= 2 && x <= i + 1 ||
                              x == 1 && (y <= j - M || y == M) ||
                              x == i + 2 && y != 2
                          ? '*'
                          : '.');
          puts("");
          return;
        }
  }
  puts("-1\n");
}
int main() {
  for (scanf("%d", &TC); TC--;) {
    scanf("%d%d%d", &N, &M, &K);
    Main();
  }
  return 0;
}