#include <bits/stdc++.h>
using namespace std;
struct unit {
  int x, y, w;
};
struct unit a[10010];
int n, m, n1;
int c[210];
long long f[210][210];
long long k, inf = 1e18;
bool cmp(struct unit aa, struct unit bb) { return aa.w < bb.w; }
long long calc() {
  int i, j;
  long long ret;
  f[1][0] = 1;
  for (i = 2; i <= n + m; i++)
    for (j = 0; j <= min(i - 2 + 1, n + m - i); j++) {
      f[i][j] = 0;
      if (c[i] == -1) {
        if (j > 0) f[i][j] += f[i - 1][j - 1];
        f[i][j] += f[i - 1][j + 1];
      } else if (c[i] == 0) {
        if (j > 0) f[i][j] += f[i - 1][j - 1];
      } else if (c[i] == 1)
        f[i][j] += f[i - 1][j + 1];
      if (f[i][j] > inf) f[i][j] = inf;
    }
  ret = f[n + m][0];
  return ret;
}
int main() {
  int i, j;
  long long s;
  cin >> n >> m >> k;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) {
      a[(i - 1) * m + j].x = i;
      a[(i - 1) * m + j].y = j;
      cin >> a[(i - 1) * m + j].w;
    }
  sort(a + 1, a + n * m + 1, cmp);
  memset(c, -1, sizeof(c));
  for (i = 1; i <= n * m; i++)
    if (c[a[i].x + a[i].y] != -1)
      continue;
    else {
      c[a[i].x + a[i].y] = 0;
      s = calc();
      if (s < k) {
        c[a[i].x + a[i].y] = 1;
        k -= s;
      }
    }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++)
      if (c[i + j] == 0)
        printf("(");
      else
        printf(")");
    printf("\n");
  }
  return 0;
}
