#include <bits/stdc++.h>
using namespace std;
const int MAXN = 210;
int mi[MAXN];
int idx[MAXN];
int n, m;
long long k;
char s[MAXN];
bool cmp(int x, int y) { return mi[x] < mi[y]; }
void init() {
  scanf("%d%d%lld", &n, &m, &k);
  for (int i = 0; i < n; ++i)
    for (int x, j = 0; j < m; ++j) {
      scanf("%d", &x);
      if (mi[i + j] == 0 || x < mi[i + j]) mi[i + j] = x;
    }
  for (int i = 0; i < n + m - 1; ++i) idx[i] = i;
  sort(idx, idx + n + m - 1, cmp);
}
long long cal() {
  static long long f[2][MAXN];
  int w = 0;
  memset(f[w], 0, sizeof(f[w]));
  f[w][0] = 1;
  for (int i = 0; i < n + m - 1; ++i) {
    memset(f[w ^ 1], 0, sizeof(f[w ^ 1]));
    for (int j = 0; j <= i + 1; ++j) {
      if (j > 0 && s[i] != ')') f[w ^ 1][j] += f[w][j - 1];
      if (s[i] != '(') f[w ^ 1][j] += f[w][j + 1];
      if (f[w ^ 1][j] > k) f[w ^ 1][j] = k + 1;
    }
    w ^= 1;
  }
  return f[w][0];
}
void solve() {
  long long tot;
  for (int i = 0; i < n + m - 1; ++i) {
    s[idx[i]] = '(';
    if ((tot = cal()) < k) {
      k -= tot;
      s[idx[i]] = ')';
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) printf("%c", s[i + j]);
    puts("");
  }
}
int main() {
  init();
  solve();
  return 0;
}
