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;
template <class T>
inline void upmax(T& a, T b) {
  if (a < b) a = b;
}
template <class T>
inline void upmin(T& a, T b) {
  if (a > b) a = b;
}
const int maxn = 100007;
const int maxm = 200007;
const int mod = 1000000007;
const int inf = 0x7fffffff;
const double eps = 1e-7;
typedef int arr[maxn];
typedef int adj[maxm];
inline int fcmp(double a, double b) {
  if (fabs(a - b) <= eps) return 0;
  if (a < b - eps) return -1;
  return 1;
}
inline int add(int a, int b) { return ((long long)a + b) % mod; }
inline int mul(int a, int b) { return ((long long)a * b) % mod; }
inline int dec(int a, int b) { return add(a, mod - b % mod); }
inline int Pow(int a, int b) {
  int t = 1;
  while (b) {
    if (b & 1) t = mul(t, a);
    a = mul(a, a), b >>= 1;
  }
  return t;
}
template <typename Type>
inline Type RD() {
  char c = getchar();
  Type x = 0, flag = 1;
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    flag = -1;
  else
    x = c - '0';
  while (isdigit(c = getchar())) x = x * 10 + c - '0';
  return x * flag;
}
inline char rdch() {
  char c = getchar();
  while (!isalpha(c)) c = getchar();
  return c;
}
int flag, n, m, tot;
vector<vector<int> > a;
void input() {
  flag = 0;
  n = RD<int>(), m = RD<int>(), tot = RD<int>();
  if (n > m) swap(n, m), flag = 1;
  a.resize(n + 1);
  for (int i = 0, _ = n; i <= _; i++) a[i].resize(m + 1);
  for (int i = 0, _ = n; i <= _; i++) fill(a[i].begin(), a[i].end(), 0);
}
inline int calc() {
  int ret = 0;
  for (int x = 1, _ = n - 1; x <= _; x++)
    for (int y = 1, _ = m - 1; y <= _; y++)
      ret += (a[x][y] & a[x + 1][y] & a[x][y + 1]) +
             (a[x][y] & a[x + 1][y] & a[x + 1][y + 1]) +
             (a[x][y] & a[x][y + 1] & a[x + 1][y + 1]) +
             (a[x + 1][y] & a[x][y + 1] & a[x + 1][y + 1]);
  return ret;
}
inline int check(int cor) {
  for (int i = 1, _ = n; i <= _; i++)
    for (int j = 1, _ = m; j <= _; j++) a[i][j] = 0;
  for (int i = 1, _ = cor; i <= _; i++) {
    int x = (i - 1) / m + 1, y = (i - 1) % m + 1;
    a[x][y] = 1;
  }
  return calc();
}
inline bool work() {
  int l = 1, r = n * m;
  int p = 0;
  while (l <= r) {
    int m = (l + r) >> 1;
    if (check(m) <= tot)
      upmax(p, m), l = m + 1;
    else
      r = m - 1;
  }
  tot -= check(p);
  if (!tot) return 1;
  if (p == n * m) return 0;
  int px = (p - 1) / m + 1, py = (p - 1) % m + 1;
  switch (tot) {
    case 1: {
      if (px != n) {
        if (py == 1)
          a[px][m] = 1;
        else
          a[px + 1][py] = 1;
        return 1;
      }
      if (py == 1) {
        a[px][py] = 0;
        a[px][py + 1] = 1;
        return 1;
      }
      if (n == 3 && m == 3) return 0;
      if (py != m - 1) {
        a[px][1] = 0;
        a[px][py + 1] = 1;
        return 1;
      }
      return 0;
    }
    case 2: {
      if (px != n) {
        if (py != 1)
          a[px + 1][py] = a[px + 1][py + 1] = 1;
        else
          a[px + 1][py] = 1, a[px + 1][py + 1] = 1, a[px][m] = 1;
        return 1;
      }
      if (py == 1) {
        if (m == 3) return 0;
        a[px][py + 2] = 1;
        return 1;
      }
      if (py < m - 1 && m - py > 2) {
        a[px][py] = 0;
        a[px][py + 1] = a[px][py + 2] = 1;
        return 1;
      }
      return 0;
    }
    case 3: {
      if (px < n) {
        if (py == m - 1)
          a[px][py + 1] = 1;
        else if (py == 1) {
          if (m != 3)
            a[px + 1][py] = a[px + 1][py + 1] = 1, a[px][m - 1] = 1;
          else
            a[px + 1][py] = a[px + 1][py + 1] = a[px][m] = a[px + 1][m] = 1;
        } else
          a[px][m] = 1, a[px + 1][py] = a[px + 1][py + 1] = 1;
        return 1;
      }
      if (n == 3 && m == 3) return 0;
      if (py == 1) {
        if (n == 3) {
          if (m == 3) return 0;
          a[1][m] = 0, a[2][m] = 0;
          a[3][m - 1] = 1;
          if (m == 4)
            a[3][2] = 1;
          else
            a[3][2] = 1, a[2][m] = 1;
          return 1;
        }
      }
      if (m - py <= 2) return 0;
      if (n == 3 && m - py <= 3) {
        if (m - py < 3) return 0;
        a[1][m] = a[2][m] = 0;
        a[px][m - 1] = 1, a[px][m - 2] = 1;
        return 1;
      }
      if (m - py <= 3) return 0;
      a[1][1] = a[n][1] = a[1][m] = 0;
      a[px][py + 1] = a[px][py + 2] = a[px][py + 3] = 1;
      return 1;
    }
  }
}
inline char ch(int x) { return x ? '*' : '.'; }
void solve() {
  if (4 * (n - 1) * (m - 1) >= tot && work()) {
    if (flag)
      for (int j = 1, _ = m; j <= _; j++) {
        for (int i = 1, _ = n; i <= _; i++) putchar(ch(a[i][j]));
        puts("");
      }
    else
      for (int i = 1, _ = n; i <= _; i++) {
        for (int j = 1, _ = m; j <= _; j++) putchar(ch(a[i][j]));
        puts("");
      }
  } else
    puts("-1");
  puts("");
}
int main() {
  for (int T = 1, _ = RD<int>(); T <= _; T++) {
    input();
    solve();
  }
  return 0;
}